Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- Auto-set --verbose if --dry-run is specified w/o --log-format.
[rsync/rsync.git]
/
testsuite
/
duplicates.test
diff --git
a/testsuite/duplicates.test
b/testsuite/duplicates.test
index
4f5080d
..
23d2994
100644
(file)
--- a/
testsuite/duplicates.test
+++ b/
testsuite/duplicates.test
@@
-19,15
+19,12
@@
# This test is not great, because it is a timing-dependent bug.
# This test is not great, because it is a timing-dependent bug.
-.
$srcdir/testsuite/rsync.fns
+.
"$suitedir/rsync.fns"
set -x
# Build some hardlinks
set -x
# Build some hardlinks
-fromdir="$scratchdir/from"
-todir="$scratchdir/to"
-
mkdir "$fromdir"
name1="$fromdir/name1"
name2="$fromdir/name2"
mkdir "$fromdir"
name1="$fromdir/name1"
name2="$fromdir/name2"
@@
-36,7
+33,7
@@
ln -s "$name1" "$name2" || fail "can't create symlink"
outfile="$scratchdir/rsync.out"
outfile="$scratchdir/rsync.out"
-checkit "
rsync
-avv \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir" \
+checkit "
$RSYNC
-avv \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir" \
| tee "$outfile"
# Make sure each file was only copied once...
| tee "$outfile"
# Make sure each file was only copied once...
@@
-44,11
+41,10
@@
if [ `grep -c '^name1$' "$outfile"` != 1 ]
then
test_fail "name1 was not copied exactly once"
fi
then
test_fail "name1 was not copied exactly once"
fi
-if [ `grep -c '^name2
$
' "$outfile"` != 1 ]
+if [ `grep -c '^name2
->
' "$outfile"` != 1 ]
then
test_fail "name2 was not copied exactly once"
fi
then
test_fail "name2 was not copied exactly once"
fi
+# The script would have aborted on error, so getting here means we've won.
exit 0
exit 0
-# last [] may have failed but if we get here then we've won
-