Added support for multiple --*-dest options.
[rsync/rsync.git] / testsuite / compare-dest.test
1 #! /bin/sh
2
3 # Copyright (C) 2004 by Wayne Davison <wayned@samba.org>
4
5 # This program is distributable under the terms of the GNU GPL see
6 # COPYING).
7
8 # Test rsync handling of the --compare-dest option.
9
10 . "$suitedir/rsync.fns"
11
12 set -x
13
14 altdir="$tmpdir/alt"
15
16 # Build some files/dirs/links to copy
17
18 hands_setup
19
20 # Setup the alt and chk dirs
21 $RSYNC -av --include=text --include='*/' --exclude='*' "$fromdir/" "$altdir/"
22
23 sleep 1
24 touch "$fromdir/dir/text"
25
26 $RSYNC -av --exclude=/text "$fromdir/" "$chkdir/"
27
28 # Let's do it!
29 checkit "$RSYNC -avv --no-whole-file --compare-dest=\"$altdir\" \
30     \"$fromdir/\" \"$todir/\"" "$chkdir" "$todir"
31
32 # The script would have aborted on error, so getting here means we've won.
33 exit 0