summaryrefslogtreecommitdiff
path: root/testsuite/merge.test
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2007-03-18 20:41:51 +0000
committerWayne Davison <wayned@samba.org>2007-03-18 20:41:51 +0000
commit108133689de94aebca29b41cf8f0156fd03123a1 (patch)
tree194bb866d296eb9bb228f76f32ae3a866b531adb /testsuite/merge.test
parent46ad63b7cf559c86e236cc0413e547cec50c5877 (diff)
downloadrsync-108133689de94aebca29b41cf8f0156fd03123a1.tar.gz
Use relative directories, and note that the merge code is only
working because it is not yet using --inc-recursion.
Diffstat (limited to 'testsuite/merge.test')
-rw-r--r--testsuite/merge.test66
1 files changed, 33 insertions, 33 deletions
diff --git a/testsuite/merge.test b/testsuite/merge.test
index 80598149..2c3844cc 100644
--- a/testsuite/merge.test
+++ b/testsuite/merge.test
@@ -11,42 +11,42 @@
# Build some files/dirs/links to copy
-from1dir="${fromdir}1"
-from2dir="${fromdir}2"
-from3dir="${fromdir}3"
-
-mkdir "$from1dir" "$from2dir" "$from3dir"
-mkdir "$from2dir"/sub1 "$from3dir"/sub1
-mkdir "$from3dir"/sub2 "$from1dir"/dir-and-not-dir
-mkdir "$chkdir" "$chkdir"/sub1 "$chkdir"/sub2 "$chkdir"/dir-and-not-dir
-echo "one" >"$from1dir"/one
-cp -p "$from1dir"/one "$from2dir"/one
-cp -p "$from1dir"/one "$from3dir"/one
-echo "two" >"$from1dir"/two
-echo "three" >"$from2dir"/three
-echo "four" >"$from3dir"/four
-echo "five" >"$from1dir"/five
-echo "six" >"$from3dir"/six
-echo "sub1" >"$from2dir"/sub1/uno
-cp -p "$from2dir"/sub1/uno "$from3dir"/sub1/uno
-echo "sub2" >"$from3dir"/sub1/dos
-echo "sub3" >"$from2dir"/sub1/tres
-echo "subby" >"$from3dir"/sub2/subby
-echo "extra" >"$from1dir"/dir-and-not-dir/inside
-echo "not-dir" >"$from3dir"/dir-and-not-dir
-
-cp -p "$from1dir"/one "$from1dir"/two "$from2dir"/three "$from3dir"/four "$from1dir"/five "$from3dir"/six "$chkdir"
-cp -p "$from1dir"/dir-and-not-dir/inside "$chkdir"/dir-and-not-dir
-cp -p "$from2dir"/sub1/uno "$from3dir"/sub1/dos "$from2dir"/sub1/tres "$chkdir"/sub1
-cp -p "$from3dir"/sub2/subby "$chkdir"/sub2
+# Use local dirnames to better exercise the arg-parsing code.
+cd "$tmpdir"
+
+mkdir from1 from2 from3
+mkdir from2/sub1 from3/sub1
+mkdir from3/sub2 from1/dir-and-not-dir
+mkdir -p chk/sub1 chk/sub2 chk/dir-and-not-dir
+echo "one" >from1/one
+cp -p from1/one from2/one
+cp -p from1/one from3/one
+echo "two" >from1/two
+echo "three" >from2/three
+echo "four" >from3/four
+echo "five" >from1/five
+echo "six" >from3/six
+echo "sub1" >from2/sub1/uno
+cp -p from2/sub1/uno from3/sub1/uno
+echo "sub2" >from3/sub1/dos
+echo "sub3" >from2/sub1/tres
+echo "subby" >from3/sub2/subby
+echo "extra" >from1/dir-and-not-dir/inside
+echo "not-dir" >from3/dir-and-not-dir
+
+cp -p from1/one from1/two from2/three from3/four from1/five from3/six chk
+cp -p from1/dir-and-not-dir/inside chk/dir-and-not-dir
+cp -p from2/sub1/uno from3/sub1/dos from2/sub1/tres chk/sub1
+cp -p from3/sub2/subby chk/sub2
# Get rid of any directory-time differences
-$RSYNC -av --existing -f 'exclude,! */' "$from1dir/" "$from2dir/"
-$RSYNC -av --existing -f 'exclude,! */' "$from2dir/" "$from3dir/"
-$RSYNC -av --existing -f 'exclude,! */' "$from1dir/" "$chkdir/"
-$RSYNC -av --existing -f 'exclude,! */' "$from3dir/" "$chkdir/"
+$RSYNC -av --existing -f 'exclude,! */' from1/ from2/
+$RSYNC -av --existing -f 'exclude,! */' from2/ from3/
+$RSYNC -av --existing -f 'exclude,! */' from1/ chk/
+$RSYNC -av --existing -f 'exclude,! */' from3/ chk/
-checkit "$RSYNC -aHvv \"$from1dir/\" \"$from2dir/\" \"$from3dir/\" \"$todir/\"" "$chkdir" "$todir"
+# TODO: fix inc-recurse unduplications of directory contents!
+checkit "$RSYNC -avv --no-ir from1/ from2/ from3/ to/" chk to
# The script would have aborted on error, so getting here means we've won.
exit 0