A daemon needs to set dry_run with --only-write-batch.
[rsync.git] / testsuite / hands.test
blob6ed46f2c605f8af0057cb61d20865189c2334ce0
1 #!/bin/sh
3 # Copyright (C) 1998, 1999 by Philip Hands <phil@hands.com>
4 # Copyright (C) 2001, 2002 by Martin Pool <mbp@samba.org>
6 # This program is distributable under the terms of the GNU GPL (see COPYING)
8 . "$suitedir/rsync.fns"
10 hands_setup
12 # Main script starts here
14 runtest "basic operation" 'checkit "$RSYNC -av \"$fromdir/\" \"$todir\"" "$fromdir/" "$todir"'
16 ln "$fromdir/filelist" "$fromdir/dir"
17 runtest "hard links" 'checkit "$RSYNC -avH \"$fromdir/\" \"$todir\"" "$fromdir/" "$todir"'
19 rm "$todir/text"
20 runtest "one file" 'checkit "$RSYNC -avH \"$fromdir/\" \"$todir\"" "$fromdir/" "$todir"'
22 echo "extra line" >> "$todir/text"
23 runtest "extra data" 'checkit "$RSYNC -avH --no-whole-file \"$fromdir/\" \"$todir\"" "$fromdir/" "$todir"'
25 cp "$fromdir/text" "$todir/ThisShouldGo"
26 runtest " --delete" 'checkit "$RSYNC --delete -avH \"$fromdir/\" \"$todir\"" "$fromdir/" "$todir"'
28 cd "$tmpdir"
29 rm -rf to from/*dir
31 # Do the real copy, touch up the parent-dir's time, and then check the copy.
32 $RSYNC -av from/* to/
33 checkit "$RSYNC -av --exclude='*' from/ to/" "$fromdir" "$todir"
35 # The script would have aborted on error, so getting here means we've won.
36 exit 0