Improved the test a little.
[rsync/rsync.git] / testsuite / compare-dest.test
1 #! /bin/sh
2
3 # Copyright (C) 2003 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 exclude/include directives.  
9
10 # Test some of the more obscure wildcard handling of exclude/include
11 # processing.
12
13 . "$suitedir/rsync.fns"
14
15 set -x
16
17 altdir="$tmpdir/alt"
18
19 # Build some files/dirs/links to copy
20
21 hands_setup
22
23 # Setup the alt and chk dirs
24 $RSYNC -av --include=text --include='*/' --exclude='*' "$fromdir/" "$altdir/"
25
26 sleep 1
27 touch "$fromdir/dir/text"
28
29 $RSYNC -av --exclude=/text "$fromdir/" "$chkdir/"
30
31 # Let's do it!
32 checkit "$RSYNC -avv --no-whole-file --compare-dest=\"$altdir\" \
33     \"$fromdir/\" \"$todir/\"" "$chkdir" "$todir"
34
35 # The script would have aborted on error, so getting here means we've won.
36 exit 0