Do some simple tests with various read-only and set[ug]id files.
[rsync/rsync.git] / testsuite / merge.test
index 3a195c4..0ef3984 100644 (file)
@@ -7,18 +7,15 @@
 
 # Make sure we can merge files from multiple directories into one.
 
-. $srcdir/testsuite/rsync.fns
+. "$suitedir/rsync.fns"
 
 set -x
 
 # Build some files/dirs/links to copy
 
-fromdir="$scratchdir/from"
 from1dir="${fromdir}1"
 from2dir="${fromdir}2"
 from3dir="${fromdir}3"
-todir="$scratchdir/to"
-chkdir="$scratchdir/chk"
 
 mkdir "$from1dir" "$from2dir" "$from3dir"
 mkdir "$from2dir"/sub1 "$from3dir"/sub1
@@ -43,8 +40,9 @@ cp -p "$from2dir"/sub1/uno "$from3dir"/sub1/dos "$from2dir"/sub1/tres "$chkdir"/
 cp -p "$from3dir"/sub2/subby "$chkdir"/sub2
 
 # Get rid of any directory-time differences
-find "$from1dir" "$from2dir" "$from3dir" "$chkdir" -type d -print0 | xargs -0 touch
+$RSYNC -av --existing --include='*/' --exclude='*' "$from1dir/" "$from2dir/" "$from3dir/" "$chkdir/"
 
-checkit "$RSYNC -aHvv \"$fromdir\"?/ \"$todir/\"" "$chkdir" "$todir"
+checkit "$RSYNC -aHvv \"$from1dir/\" \"$from2dir/\" \"$from3dir/\" \"$todir/\"" "$chkdir" "$todir"
 
+# The script would have aborted on error, so getting here means we've won.
 exit 0