Fixed an "Internal abbrev error" when dealing with an xattr value
[rsync/rsync.git] / testsuite / compare-dest.test
CommitLineData
dce70db3
WD
1#! /bin/sh
2
0abda1b1 3# Copyright (C) 2004 by Wayne Davison <wayned@samba.org>
dce70db3 4
c8d19f90 5# This program is distributable under the terms of the GNU GPL (see
dce70db3
WD
6# COPYING).
7
0abda1b1 8# Test rsync handling of the --compare-dest option.
dce70db3
WD
9
10. "$suitedir/rsync.fns"
11
1e609696
WD
12alt1dir="$tmpdir/alt1"
13alt2dir="$tmpdir/alt2"
dce70db3
WD
14
15# Build some files/dirs/links to copy
16
17hands_setup
18
3381b77d 19# Setup the alt and chk dirs
1e609696
WD
20$RSYNC -av --include=text --include='*/' --exclude='*' "$fromdir/" "$alt1dir/"
21$RSYNC -av --include=etc-ltr-list --include='*/' --exclude='*' "$fromdir/" "$alt2dir/"
dce70db3 22
3381b77d
WD
23sleep 1
24touch "$fromdir/dir/text"
25
1e609696 26$RSYNC -av --exclude=/text --exclude=etc-ltr-list "$fromdir/" "$chkdir/"
3381b77d
WD
27
28# Let's do it!
1e609696 29checkit "$RSYNC -avv --no-whole-file \
7918f244
WD
30 --compare-dest='$alt1dir' --compare-dest='$alt2dir' \
31 '$fromdir/' '$todir/'" "$chkdir" "$todir"
566a8741 32checkit "$RSYNC -avv --no-whole-file \
7918f244
WD
33 --copy-dest='$alt1dir' --copy-dest='$alt2dir' \
34 '$fromdir/' '$todir/'" "$fromdir" "$todir"
dce70db3
WD
35
36# The script would have aborted on error, so getting here means we've won.
37exit 0