3 # Copyright (C) 2004 by Chris Shoemaker <c.shoemaker@cox.net>
5 # This program is distributable under the terms of the GNU GPL (see
8 # Test rsync's --write-batch and --read-batch options
10 . "$suitedir/rsync.fns"
16 # Build chkdir for the daemon tests using a normal rsync and an --exclude.
17 $RSYNC -av --exclude=foobar.baz "$fromdir/" "$chkdir/"
19 runtest "local --write-batch" 'checkit "$RSYNC -av --write-batch=BATCH \"$fromdir/\" \"$todir\"" "$fromdir" "$todir"'
22 runtest "--read-batch" 'checkit "$RSYNC -av --read-batch=BATCH \"$todir\"" "$fromdir" "$todir"'
26 RSYNC_CONNECT_PROG="$RSYNC --config=$conf --daemon"
27 export RSYNC_CONNECT_PROG
30 runtest "daemon sender --write-batch" 'checkit "$RSYNC -av --write-batch=BATCH rsync://localhost/test-from/ \"$todir\"" "$chkdir" "$todir"'
33 runtest "--read-batch from daemon" 'checkit "$RSYNC -av --read-batch=BATCH \"$todir\"" "$chkdir" "$todir"'
36 runtest "BATCH.sh use of --read-batch" 'checkit "./BATCH.sh" "$chkdir" "$todir"'
39 mkdir "$todir" || test_fail "failed to restore empty destination directory"
40 runtest "daemon recv --write-batch" 'checkit "$RSYNC -av --write-batch=BATCH \"$fromdir/\" rsync://localhost/test-to" "$chkdir" "$todir"'
42 # The script would have aborted on error, so getting here means we pass.