summaryrefslogtreecommitdiff
path: root/testsuite/backup.test
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2007-04-24 19:03:54 +0000
committerWayne Davison <wayned@samba.org>2007-04-24 19:03:54 +0000
commitf1271537a4c36c748754cf72854ed60e0831659a (patch)
tree5116e39e3ed76cf097a91787e6b847399e21b36d /testsuite/backup.test
parentb13505da1d2f8a7f6e8df88e0b421ff0e7a2da54 (diff)
downloadrsync-f1271537a4c36c748754cf72854ed60e0831659a.tar.gz
Put the files down in a subdir so that we test backup's dir-
creating functionality (which had a bug until recently).
Diffstat (limited to 'testsuite/backup.test')
-rw-r--r--testsuite/backup.test14
1 files changed, 7 insertions, 7 deletions
diff --git a/testsuite/backup.test b/testsuite/backup.test
index f2cdb283..3d026f3f 100644
--- a/testsuite/backup.test
+++ b/testsuite/backup.test
@@ -11,9 +11,9 @@
bakdir="$tmpdir/bak"
-mkdir "$fromdir" "$bakdir"
-name1="$fromdir/name1"
-name2="$fromdir/name2"
+makepath "$fromdir/deep" "$bakdir"
+name1="$fromdir/deep/name1"
+name2="$fromdir/deep/name2"
outfile="$scratchdir/rsync.out"
@@ -28,9 +28,9 @@ cat "$srcdir"/[etw]*.[ch] > "$name2"
$RSYNC -avv --no-whole-file --backup "$fromdir/" "$todir/" \
| tee "$outfile"
-for fn in name1 name2; do
+for fn in deep/name1 deep/name2; do
grep "backed up $fn to $fn~" "$outfile" >/dev/null || test_fail "no backup message output for $fn"
- diff $diffopt "$fromdir/$fn" "$todir" || test_fail "copy of $fn failed"
+ diff $diffopt "$fromdir/$fn" "$todir/$fn" || test_fail "copy of $fn failed"
diff $diffopt "$chkdir/$fn" "$todir/$fn~" || test_fail "backup of $fn to $fn~ failed"
mv "$todir/$fn~" "$todir/$fn"
done
@@ -42,7 +42,7 @@ checkit "$RSYNC -avv --no-whole-file --delete-delay \
--backup --backup-dir=\"$bakdir\" \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir" \
| tee "$outfile"
-for fn in name1 name2; do
+for fn in deep/name1 deep/name2; do
grep "backed up $fn to .*/$fn$" "$outfile" >/dev/null || test_fail "no backup message output for $fn"
done
diff -r $diffopt "$chkdir" "$bakdir" || test_fail "backup dir contents are bogus"
@@ -55,7 +55,7 @@ cat "$srcdir"/[ew]*.[ch] > "$name2"
checkit "$RSYNC -avv --inplace --no-whole-file --backup --backup-dir=\"$bakdir\" \"$fromdir/\" \"$todir/\"" "$fromdir" "$todir" \
| tee "$outfile"
-for fn in name1 name2; do
+for fn in deep/name1 deep/name2; do
grep "backed up $fn to .*/$fn$" "$outfile" >/dev/null || test_fail "no backup message output for $fn"
done
diff -r $diffopt "$chkdir" "$bakdir" || test_fail "backup dir contents are bogus"