$RSYNC -iplr "$fromdir/" "$todir/" \
| tee "$outfile"
cat <<EOT >"$chkfile"
+cd+++++++ ./
cd+++++++ bar/
cd+++++++ bar/baz/
>f+++++++ bar/baz/rsync
diff $diffopt "$chkfile" "$outfile" || test_fail "test 7 failed"
mv "$todir" "$lddir"
-$RSYNC -ivvplrtH --copy-dest="$lddir" "$fromdir/" "$todir/" \
+$RSYNC -ivvplrtH --copy-dest=../ld "$fromdir/" "$todir/" \
| tee "$outfile"
filter_outfile
cat <<EOT >"$chkfile"
-.d..t.... ./
+cd+++++++ ./
cd+++++++ bar/
cd+++++++ bar/baz/
cf bar/baz/rsync
diff $diffopt "$chkfile" "$outfile" || test_fail "test 8 failed"
rm -rf "$todir"
-$RSYNC -iplrtH --copy-dest="$lddir" "$fromdir/" "$todir/" \
+$RSYNC -iplrtH --copy-dest=../ld "$fromdir/" "$todir/" \
| tee "$outfile"
cat <<EOT >"$chkfile"
-.d..t.... ./
+cd+++++++ ./
cd+++++++ bar/
cd+++++++ bar/baz/
cd+++++++ foo/
| tee "$outfile"
filter_outfile
cat <<EOT >"$chkfile"
-.d..t.... ./
+cd+++++++ ./
cd+++++++ bar/
cd+++++++ bar/baz/
hf bar/baz/rsync
diff $diffopt "$chkfile" "$outfile" || test_fail "test 11 failed"
rm -rf "$todir"
-$RSYNC -iplrtH --link-dest="$lddir" "$fromdir/" "$todir/" \
+$RSYNC -iplrtH --dry-run --link-dest=../ld "$fromdir/" "$todir/" \
| tee "$outfile"
cat <<EOT >"$chkfile"
-.d..t.... ./
+cd+++++++ ./
cd+++++++ bar/
cd+++++++ bar/baz/
cd+++++++ foo/
EOT
diff $diffopt "$chkfile" "$outfile" || test_fail "test 12 failed"
+rm -rf "$todir"
+$RSYNC -iplrtH --link-dest=../ld "$fromdir/" "$todir/" \
+ | tee "$outfile"
+cat <<EOT >"$chkfile"
+cd+++++++ ./
+cd+++++++ bar/
+cd+++++++ bar/baz/
+cd+++++++ foo/
+EOT
+diff $diffopt "$chkfile" "$outfile" || test_fail "test 13 failed"
+
rm -rf "$todir"
$RSYNC -vvplrtH --link-dest="$lddir" "$fromdir/" "$todir/" \
| tee "$outfile"
"foo/extra" is a hard link
foo/sym is uptodate
EOT
-diff $diffopt "$chkfile" "$outfile" || test_fail "test 13 failed"
+diff $diffopt "$chkfile" "$outfile" || test_fail "test 14 failed"
rm -rf "$todir"
$RSYNC -ivvplrtH --compare-dest="$lddir" "$fromdir/" "$todir/" \
# TODO fix really-old problem when combining -H with --compare-dest:
# missing output for foo/extra hard-link (and it might not be updated)!
cat <<EOT >"$chkfile"
-.d..t.... ./
+cd+++++++ ./
cd+++++++ bar/
cd+++++++ bar/baz/
.f bar/baz/rsync
.f foo/config2
.L foo/sym -> ../bar/baz/rsync
EOT
-diff $diffopt "$chkfile" "$outfile" || test_fail "test 14 failed"
+diff $diffopt "$chkfile" "$outfile" || test_fail "test 15 failed"
rm -rf "$todir"
$RSYNC -iplrtH --compare-dest="$lddir" "$fromdir/" "$todir/" \
| tee "$outfile"
cat <<EOT >"$chkfile"
-.d..t.... ./
+cd+++++++ ./
cd+++++++ bar/
cd+++++++ bar/baz/
cd+++++++ foo/
EOT
-diff $diffopt "$chkfile" "$outfile" || test_fail "test 15 failed"
+diff $diffopt "$chkfile" "$outfile" || test_fail "test 16 failed"
rm -rf "$todir"
$RSYNC -vvplrtH --compare-dest="$lddir" "$fromdir/" "$todir/" \
"foo/extra" is a hard link
foo/sym is uptodate
EOT
-diff $diffopt "$chkfile" "$outfile" || test_fail "test 16 failed"
+diff $diffopt "$chkfile" "$outfile" || test_fail "test 17 failed"
# The script would have aborted on error, so getting here means we've won.
exit 0