X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/434e77193cfb17e92a70e6519fd091700a2ec5a4..a055dbdd883a3c04318e13211c3ef7942314bee7:/testsuite/exclude.test diff --git a/testsuite/exclude.test b/testsuite/exclude.test index 1aa33e32..099344f2 100644 --- a/testsuite/exclude.test +++ b/testsuite/exclude.test @@ -5,7 +5,7 @@ # This program is distributable under the terms of the GNU GPL (see # COPYING). -# Test rsync handling of exclude/include directives. +# Test rsync handling of exclude/include directives. # Test some of the more obscure wildcard handling of exclude/include # processing. @@ -76,7 +76,6 @@ EOF echo cvsin >"$fromdir/mid/for/one-in-one-out" echo expunged >"$fromdir/mid/for/foo/extra" echo retained >"$fromdir/mid/for/foo/keep" -ln -s too "$fromdir/bar/down/to/foo/sym" # Setup our test exclude/include files. @@ -106,12 +105,17 @@ cat >"$scratchdir/.cvsignore" <"$todir"/bar/down/to/bar/baz/nodel.deep -cp -p "$todir"/bar/down/to/bar/baz/nodel.deep "$chkdir"/bar/down/to/bar/baz +cp_touch "$todir"/bar/down/to/bar/baz/nodel.deep "$chkdir"/bar/down/to/bar/baz $RSYNC -av --existing --filter='-! */' "$fromdir/" "$chkdir/" # Now, test if rsync excludes the same files, this time with a merge-exclude # file. -checkit "sed '/!/d' \"$excl\" | +checkit "sed '/!/d' '$excl' | $RSYNC -avv -f dir-merge_.filt -f merge_- \ - --delete-during \"$fromdir/\" \"$todir/\"" "$chkdir" "$todir" + --delete-during '$fromdir/' '$todir/'" "$chkdir" "$todir" # Remove the files that will be deleted. @@ -180,9 +184,9 @@ $RSYNC -av --protocol=28 --existing --include='*/' --exclude='*' "$fromdir/" "$c # Now, try the prior command with --delete-before and some side-specific # rules. -checkit "sed '/!/d' \"$excl\" | +checkit "sed '/!/d' '$excl' | $RSYNC -avv -f :s_.filt -f .s_- -f P_nodel.deep \ - --delete-before \"$fromdir/\" \"$todir/\"" "$chkdir" "$todir" + --delete-before '$fromdir/' '$todir/'" "$chkdir" "$todir" # Next, we'll test some rule-restricted filter files. @@ -201,17 +205,15 @@ $RSYNC -av --existing --filter='-! */' "$fromdir/" "$chkdir/" $RSYNC -av --delete-excluded --exclude='*' "$fromdir/" "$todir/" checkit "$RSYNC -avv -f dir-merge,-_.excl \ - \"$fromdir/\" \"$todir/\"" "$chkdir" "$todir" - -set -x + '$fromdir/' '$todir/'" "$chkdir" "$todir" relative_opts='--relative --chmod=Du+w --copy-unsafe-links' $RSYNC -av $relative_opts "$fromdir/foo" "$chkdir/" rm -rf "$chkdir$fromdir/foo/down" $RSYNC -av $relative_opts --existing --filter='-! */' "$fromdir/foo" "$chkdir/" -checkit "$RSYNC -avv $relative_opts --exclude=\"$fromdir/foo/down\" \ - \"$fromdir/foo\" \"$todir\"" "$chkdir$fromdir/foo" "$todir$fromdir/foo" +checkit "$RSYNC -avv $relative_opts --exclude='$fromdir/foo/down' \ + '$fromdir/foo' '$todir'" "$chkdir$fromdir/foo" "$todir$fromdir/foo" # The script would have aborted on error, so getting here means we've won. exit 0