Two more tests:
authorWayne Davison <wayned@samba.org>
Sat, 23 Apr 2005 18:20:47 +0000 (18:20 +0000)
committerWayne Davison <wayned@samba.org>
Sat, 23 Apr 2005 18:20:47 +0000 (18:20 +0000)
- Update the hard-linked cluster and copy over the old versions.
- Add a new hard-linked item down in a new subdir to make sure that
  the new file doesn't get handled before the subdir gets created.

testsuite/hardlinks.test

index d5e4db9..2f5399e 100644 (file)
@@ -30,12 +30,23 @@ echo "This is the file" > "$name1"
 ln "$name1" "$name2" || fail "Can't create hardlink"
 ln "$name2" "$name3" || fail "Can't create hardlink"
 cp "$name2" "$name4" || fail "Can't copy file"
+cat $srcdir/*.c >"$fromdir/text"
+
+checkit "$RSYNC -aHivv \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir"
+
+echo "extra extra" >>"$todir/name1"
+
+checkit "$RSYNC -aHivv --no-whole-file \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir"
+
+mkdir "$fromdir/subdir"
+ln "$name1" "$fromdir/subdir/new-file"
+rm "$todir/text"
 
 checkit "$RSYNC -aHivv \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir"
-rm -rf "$todir"
 
 # Make sure there's nothing wrong with sending a single file with -H
 # enabled (this has broken twice so far, so we need this test).
+rm -rf "$todir"
 $RSYNC -aHivv "$name1" "$todir/"
 diff $diffopt "$name1" "$todir" || test_fail "solo copy of name1 failed"