# specify -H, then hard links are detected and recreated as hardlinks
# on the other end.
-. $srcdir/testsuite/rsync.fns
+. "$suitedir/rsync.fns"
set -x
ln "$name2" "$name3" || fail "Can't create hardlink"
cp "$name2" "$name4" || fail "Can't copy file"
-checkit "rsync -aHvv \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir"
+checkit "$RSYNC -aHivv \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir"
+rm -rf "$todir"
-exit 0
-# last [] may have failed but if we get here then we've won
+# Make sure there's nothing wrong with sending a single file with -H
+# enabled (this has had a problem twice now, so we need this).
+mkdir "$chkdir"
+cp -p "$name1" "$chkdir"
+rsync -avvi -f '-! */' "$fromdir/" "$chkdir/"
+checkit "$RSYNC -aHivv \"$name1\" \"$todir/\"" "$chkdir" "$todir"
+# The script would have aborted on error, so getting here means we've won.
+exit 0