Handle the itemizing of of the "." dir when it is newly created.
[rsync/rsync.git] / testsuite / itemize.test
index c77ace5..c05129f 100644 (file)
@@ -29,6 +29,7 @@ ln "$fromdir/foo/config1" "$fromdir/foo/extra"
 $RSYNC -iplr "$fromdir/" "$todir/" \
     | tee "$outfile"
 cat <<EOT >"$chkfile"
+cd+++++++ ./
 cd+++++++ bar/
 cd+++++++ bar/baz/
 >f+++++++ bar/baz/rsync
@@ -130,11 +131,11 @@ EOT
 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
@@ -147,10 +148,10 @@ EOT
 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/
@@ -181,7 +182,7 @@ $RSYNC -ivvplrtH --link-dest="$lddir" "$fromdir/" "$todir/" \
     | tee "$outfile"
 filter_outfile
 cat <<EOT >"$chkfile"
-.d..t.... ./
+cd+++++++ ./
 cd+++++++ bar/
 cd+++++++ bar/baz/
 hf        bar/baz/rsync
@@ -194,10 +195,21 @@ EOT
 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/
@@ -228,7 +240,7 @@ filter_outfile
 # 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
@@ -243,7 +255,7 @@ 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/