X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/dce70db374f130fe001e0af478e07da3608384b8..7918f2440534993bdda324da839b2ea9a3884757:/testsuite/compare-dest.test diff --git a/testsuite/compare-dest.test b/testsuite/compare-dest.test index 28dbda1c..d9eea8e9 100644 --- a/testsuite/compare-dest.test +++ b/testsuite/compare-dest.test @@ -1,30 +1,37 @@ #! /bin/sh -# Copyright (C) 2003 by Wayne Davison +# Copyright (C) 2004 by Wayne Davison -# This program is distributable under the terms of the GNU GPL see +# This program is distributable under the terms of the GNU GPL (see # COPYING). -# Test rsync handling of exclude/include directives. - -# Test some of the more obscure wildcard handling of exclude/include -# processing. +# Test rsync handling of the --compare-dest option. . "$suitedir/rsync.fns" -set -x - -altdir="$tmpdir/alt" +alt1dir="$tmpdir/alt1" +alt2dir="$tmpdir/alt2" # Build some files/dirs/links to copy hands_setup -# Setup the chk and alt dirs -$RSYNC -av --exclude=text "$fromdir/" "$chkdir/" -$RSYNC -av --include=text --include='*/' --exclude='*' "$fromdir/" "$altdir/" +# Setup the alt and chk dirs +$RSYNC -av --include=text --include='*/' --exclude='*' "$fromdir/" "$alt1dir/" +$RSYNC -av --include=etc-ltr-list --include='*/' --exclude='*' "$fromdir/" "$alt2dir/" + +sleep 1 +touch "$fromdir/dir/text" + +$RSYNC -av --exclude=/text --exclude=etc-ltr-list "$fromdir/" "$chkdir/" -checkit "$RSYNC -avv --compare-dest=\"$altdir\" \"$fromdir/\" \"$todir/\"" "$chkdir" "$todir" +# Let's do it! +checkit "$RSYNC -avv --no-whole-file \ + --compare-dest='$alt1dir' --compare-dest='$alt2dir' \ + '$fromdir/' '$todir/'" "$chkdir" "$todir" +checkit "$RSYNC -avv --no-whole-file \ + --copy-dest='$alt1dir' --copy-dest='$alt2dir' \ + '$fromdir/' '$todir/'" "$fromdir" "$todir" # The script would have aborted on error, so getting here means we've won. exit 0