summaryrefslogtreecommitdiffstats
path: root/testsuite/wildmatch.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 16:14:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 16:14:31 +0000
commit2d5707c7479eacb3b1ad98e01b53f56a88f8fb78 (patch)
treed9c334e83692851c02e3e1b8e65570c97bc82481 /testsuite/wildmatch.test
parentInitial commit. (diff)
downloadrsync-2d5707c7479eacb3b1ad98e01b53f56a88f8fb78.tar.xz
rsync-2d5707c7479eacb3b1ad98e01b53f56a88f8fb78.zip
Adding upstream version 3.2.7.upstream/3.2.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testsuite/wildmatch.test')
-rw-r--r--testsuite/wildmatch.test23
1 files changed, 23 insertions, 0 deletions
diff --git a/testsuite/wildmatch.test b/testsuite/wildmatch.test
new file mode 100644
index 0000000..cfe7584
--- /dev/null
+++ b/testsuite/wildmatch.test
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# Copyright (C) 2003-2022 Wayne Davison
+
+# This program is distributable under the terms of the GNU GPL (see
+# COPYING).
+
+# Test the wildmatch functionality
+
+. "$suitedir/rsync.fns"
+
+# This test exercises the wildmatch() function (with no options) and the
+# wildmatch_join() function (using -x and/or -e).
+for opts in "" -x1 "-x1 -e1" "-x1 -e1se" -x2 "-x2 -ese" -x3 "-x3 -e1" -x4 "-x4 -e2e" -x5 "-x5 -es"; do
+ echo Running wildtest with "$opts"
+ "$TOOLDIR/wildtest" $opts "$srcdir/wildtest.txt" >"$scratchdir/wild.out"
+ diff $diffopt "$scratchdir/wild.out" - <<EOF
+No wildmatch errors found.
+EOF
+done
+
+# The script would have aborted on error, so getting here means we've won.
+exit 0