3 # Copyright (C) 2005 by Wayne Davison <wayned@samba.org>
5 # This program is distributable under the terms of the GNU GPL (see COPYING)
7 .
"$suitedir/rsync.fns"
10 deepdir
="$fromdir/$deepstr"
11 extradir
="$fromdir/extra"
12 makepath
"$deepdir" "$extradir/$deepstr" "$chkdir"
16 fromdir
="$tmpdir/from"
18 extrafile
="$extradir/./$deepstr/extra.added.value"
19 echo wowza
>"$extrafile"
21 $RSYNC -av --existing --include='*/' --exclude='*' "$fromdir/" "$extradir/"
23 outfile
="$scratchdir/rsync.out"
27 # Main script starts here
29 $RSYNC -ai --include=/down
/ --exclude='/*' "$fromdir/" "$chkdir/"
32 runtest
"basic relative" 'checkit "$RSYNC -avR ./$deepstr \"$todir\"" "$chkdir" "$todir"'
34 ln $deepstr/filelist
$deepstr/dir
35 ln ..
/chk
/$deepstr/filelist ..
/chk
/$deepstr/dir
36 runtest
"hard links" 'checkit "$RSYNC -avHR ./$deepstr/ \"$todir\"" "$chkdir" "$todir"'
38 cp "$deepdir/text" "$todir/$deepstr/ThisShouldGo"
39 cp "$deepdir/text" "$todir/$deepstr/dir/ThisShouldGoToo"
40 runtest
"deletion" 'checkit "$RSYNC -avHR --del ./$deepstr/ \"$todir\"" "$chkdir" "$todir"'
42 runtest
"non-deletion" 'checkit "$RSYNC -aiHR --del ./$deepstr/ \"$todir\"" "$chkdir" "$todir"' \
45 # Make sure no files were deleted
46 grep 'deleting ' "$outfile" && test_fail
"Erroneous deletions occurred!"
48 # Relative with merging.
49 $RSYNC -ai "$extradir/down" "$chkdir/"
51 checkit
"$RSYNC -aiR $deepstr '$extrafile' '$todir'" "$chkdir" "$todir"
53 checkit
"$RSYNC -aiR --del $deepstr '$extrafile' '$todir'" "$chkdir" "$todir" \
56 # Make sure no files were deleted
57 grep 'deleting ' "$outfile" && test_fail
"Erroneous deletions occurred! (2)"
59 # The script would have aborted on error, so getting here means we've won.