aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.travis/test.sh
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-01-24 01:59:07 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-01-24 01:59:07 +0300
commit967f4912bfdf6e8272b70ef3e3ceafcbdd2d02ed (patch)
tree1ee01d60de121c9bff083a8b33ebdaa9636e339c /.travis/test.sh
parentTravis: add more comments (diff)
downloadconfig-links-967f4912bfdf6e8272b70ef3e3ceafcbdd2d02ed.tar.gz
config-links-967f4912bfdf6e8272b70ef3e3ceafcbdd2d02ed.zip
Travis: test_symlinks_unlink_works
Diffstat (limited to '.travis/test.sh')
-rwxr-xr-x.travis/test.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/.travis/test.sh b/.travis/test.sh
index 6300c32..46f5499 100755
--- a/.travis/test.sh
+++ b/.travis/test.sh
@@ -160,11 +160,33 @@ $test_alt_dest_dir/bar/baz/4.txt->$test_src_dir/%ALT_DEST%/bar/baz/4.txt"
verify_output "$expected_output" "$test_alt_dest_dir"
}
+test_symlinks_unlink_works() {
+ # Test that unlink.sh works for symlinked directories inside --shared-dir.
+
+ new_test
+
+ # Files will get symlinks in the directory pointed to by $DEST, as well as
+ # by $ALT_DEST.
+ ln -s -- '%DEST%' "$test_src_dir/%ALT_DEST%"
+
+ DEST="$test_dest_dir" ALT_DEST="$test_alt_dest_dir" "$script_dir/../bin/update.sh" --shared-dir "$test_src_dir"
+ DEST="$test_dest_dir" ALT_DEST="$test_alt_dest_dir" "$script_dir/../bin/unlink.sh" --shared-dir "$test_src_dir"
+
+ local expected_output
+
+ expected_output="$test_dest_dir->"
+ verify_output "$expected_output"
+
+ expected_output="$test_alt_dest_dir->"
+ verify_output "$expected_output" "$test_alt_dest_dir"
+}
+
main() {
test_update_works
test_unlink_works
test_unlink_does_not_overwrite_files
test_symlinks_update_works
+ test_symlinks_unlink_works
}
main