aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-01-27 14:08:13 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-01-27 14:11:48 +0300
commita95dbda385aeb1645eb7f65487d0be67c7a9de97 (patch)
tree61fbe2f874b8415ff3cddfee2fb02e6daef348c9
parentTravis: new database for each test (diff)
downloadconfig-links-a95dbda385aeb1645eb7f65487d0be67c7a9de97.tar.gz
config-links-a95dbda385aeb1645eb7f65487d0be67c7a9de97.zip
Travis: test_symlink_*: actually do fail
Diffstat (limited to '')
-rwxr-xr-x.travis/test.sh24
1 files changed, 18 insertions, 6 deletions
diff --git a/.travis/test.sh b/.travis/test.sh
index 7717062..e7bcd5a 100755
--- a/.travis/test.sh
+++ b/.travis/test.sh
@@ -275,9 +275,15 @@ $test_dest_dir/foo/2.txt->$test_src_dir/%DEST%/foo/2.txt"
verify_output "$expected_output"
echo
- echo 'Verifying 3_copy.txt is valid...'
- readlink -e -- "$test_dest_dir/3_copy.txt"
- cat -- "$test_dest_dir/3_copy.txt"
+ echo 'Verifying 3_copy.txt (the symlink) is valid...'
+
+ local copy_target
+ copy_target="$( readlink -- "$test_dest_dir/3_copy.txt" )"
+ test "$copy_target" = "$test_src_dir/%DEST%/3_copy.txt"
+
+ local copy_content
+ copy_content="$( cat -- "$test_dest_dir/3_copy.txt" )"
+ test "$copy_content" = '3'
}
test_symlink_unlink_works() {
@@ -291,9 +297,15 @@ test_symlink_unlink_works() {
verify_output "$expected_output"
echo
- echo 'Verifying 3_copy.txt is valid...'
- readlink -e -- "$test_src_dir/%DEST%/3_copy.txt"
- cat -- "$test_src_dir/%DEST%/3_copy.txt"
+ echo 'Verifying 3_copy.txt (the shared file) is valid...'
+
+ local copy_target
+ copy_target="$( readlink -e -- "$test_src_dir/%DEST%/3_copy.txt" )"
+ test "$copy_target" = "$test_src_dir/%DEST%/bar/3.txt"
+
+ local copy_content
+ copy_content="$( cat -- "$test_src_dir/%DEST%/3_copy.txt" )"
+ test "$copy_content" = '3'
}
main() {