X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/fc29efc38d0da298f97dfbd84e7fbb1d730e0060..9270e88d76d3ea9e94d48977fbea57b997545577:/testsuite/itemize.test diff --git a/testsuite/itemize.test b/testsuite/itemize.test index 80b50050..655e3177 100644 --- a/testsuite/itemize.test +++ b/testsuite/itemize.test @@ -25,16 +25,14 @@ umask 0 ln -s ../bar/baz/rsync "$fromdir/foo/sym" umask 022 ln "$fromdir/foo/config1" "$fromdir/foo/extra" +rm -f "$to2dir" -# Check if the OS can hard-link symlinks or not. -# (Note: the link we check MUST NOT point to a valid file!) -ln -s no-such-dir "$to2dir" -if ln "$to2dir" "$to2dir.test" 2>/dev/null; then +# Check if rsync is set to hard-link symlinks. +if egrep '^#define CAN_HARDLINK_SYMLINK 1' config.h >/dev/null; then L=hL else L=cL fi -rm -f "$to2dir" "$to2dir.test" # Check if rsync can preserve time on symlinks case "$RSYNC" in @@ -97,7 +95,7 @@ cat <"$chkfile" .d..t.$dots foo/ .f..t.$dots foo/config1 >fcstp$dots foo/config2 -cL.$T.$dots foo/sym -> ../bar/baz/rsync +cLc$T.$dots foo/sym -> ../bar/baz/rsync EOT diff $diffopt "$chkfile" "$outfile" || test_fail "test 3 failed" @@ -110,9 +108,9 @@ filter_outfile cat <"$chkfile" bar/baz/rsync is uptodate foo/config1 is uptodate -foo/config2 foo/extra is uptodate foo/sym is uptodate +foo/config2 EOT diff $diffopt "$chkfile" "$outfile" || test_fail "test 4 failed" @@ -158,8 +156,8 @@ $RSYNC -ivvplrtH --copy-dest=../to "$fromdir/" "$to2dir/" \ | tee "$outfile" filter_outfile case `tail -1 "$outfile"` in -cL..t*) - sym_dots="..t.$dots" +cLc.t*) + sym_dots="c.t.$dots" L_sym_dots="cL$sym_dots" is_uptodate='-> ../bar/baz/rsync' echo "cL$sym_dots foo/sym $is_uptodate" >"$chkfile.extra" @@ -205,8 +203,8 @@ bar/baz/rsync is uptodate foo/ is uptodate foo/config1 is uptodate foo/config2 is uptodate -foo/extra => foo/config1 foo/sym $is_uptodate +foo/extra => foo/config1 EOT diff $diffopt "$chkfile" "$outfile" || test_fail "test 10 failed"