X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/559e727bf72beea402f5c1bbf5d56511266a37fa..7462c6ac39d86cb8252ec47246569e3ddda35b6a:/testsuite/unsafe-links.test diff --git a/testsuite/unsafe-links.test b/testsuite/unsafe-links.test index faaa6b28..058269ef 100644 --- a/testsuite/unsafe-links.test +++ b/testsuite/unsafe-links.test @@ -2,7 +2,7 @@ # Originally by VladimĂ­r Michl -. $srcdir/testsuite/rsync.fns +. "$suitedir/rsync.fns" test_symlink() { is_a_link "$1" || test_fail "File $1 is not a symlink" @@ -14,7 +14,7 @@ test_regular() { fi; }; -cd "$TMP" +cd "$tmpdir" mkdir from @@ -32,39 +32,34 @@ ln -s ../files/file1 "from/safe/links/" ln -s ../files/file2 "from/safe/links/" ln -s ../../unsafe/unsafefile "from/safe/links/" -set -x - echo "rsync with relative path and just -a"; -rsync -avv from/safe/ to +$RSYNC -avv from/safe/ to test_symlink to/links/file1 test_symlink to/links/file2 test_symlink to/links/unsafefile echo "rsync with relative path and -a --copy-links" -rsync -avv --copy-links from/safe/ to +$RSYNC -avv --copy-links from/safe/ to test_regular to/links/file1 test_regular to/links/file2 test_regular to/links/unsafefile -#next rsync copy correctly echo "rsync with relative path and --copy-unsafe-links"; -rsync -avv --copy-unsafe-links from/safe/ to +$RSYNC -avv --copy-unsafe-links from/safe/ to test_symlink to/links/file1 test_symlink to/links/file2 test_regular to/links/unsafefile rm -rf to -#next rsync copy incorrectly - links are copied as files not as links echo "rsync with relative2 path"; -(cd from; rsync -avv --copy-unsafe-links safe/ ../to) +(cd from; $RSYNC -avv --copy-unsafe-links safe/ ../to) test_symlink to/links/file1 test_symlink to/links/file2 test_regular to/links/unsafefile rm -rf to -#next rsync copy uncorectly - all links are copied echo "rsync with absolute path"; -rsync -avv --copy-unsafe-links `pwd`/from/safe/ to +$RSYNC -avv --copy-unsafe-links `pwd`/from/safe/ to test_symlink to/links/file1 test_symlink to/links/file2 test_regular to/links/unsafefile