aboutsummaryrefslogtreecommitdiff
path: root/tests/name
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-03-17 15:20:41 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-03-17 15:20:41 +0200
commit9f93d058c363ef61802222d8a63a75b0643c8bf0 (patch)
tree6a299df723664e280f26879fd8e2640567dc3c84 /tests/name
parentee64fadec760e28945808720271866a3be4935e1 (diff)
Add support for inclusion/exclusion groups in wildcard patterns
For example cxx{* -{foo bar *x}}.
Diffstat (limited to 'tests/name')
-rw-r--r--tests/name/pattern.test34
1 files changed, 20 insertions, 14 deletions
diff --git a/tests/name/pattern.test b/tests/name/pattern.test
index ae0cc3a..6606d86 100644
--- a/tests/name/pattern.test
+++ b/tests/name/pattern.test
@@ -66,46 +66,52 @@ EOI
:
{
touch foo.txt;
- $* <'print *.txt' >'foo.txt' : simple-file
+ $* <'print *.txt' >'foo.txt' : simple-file
mkdir foo;
- $* <'print */' >/'foo/' : simple-dir
+ $* <'print */' >/'foo/' : simple-dir
touch foo.txt;
- $* <'print {*.txt}' >'foo.txt' : group
+ $* <'print {*.txt}' >'foo.txt' : group
mkdir dir && touch dir/foo.txt;
- $* <'print dir/{*.txt}' >'dir/foo.txt' : dir
+ $* <'print dir/{*.txt}' >'dir/foo.txt' : dir
touch foo.txt;
- $* <'print file{*.txt}' >'file{foo.txt}' : type
+ $* <'print file{*.txt}' >'file{foo.txt}' : type
touch foo.txt;
- $* <'print x@{*.txt}' >'x@foo.txt' : pair
+ $* <'print x@{*.txt}' >'x@foo.txt' : pair
touch bar.txt;
- $* <'print x@dir/file{f*.txt}' >'' : empty
+ $* <'print x@dir/file{f*.txt}' >'' : empty
mkdir dir && touch dir/foo.txt;
- $* <'print **.txt' >/'dir/foo.txt' : recursive
+ $* <'print **.txt' >/'dir/foo.txt' : recursive
mkdir dir && touch dir/foo.txt;
- $* <'print d*/*.txt' >/'dir/foo.txt' : multi-pattern
+ $* <'print d*/*.txt' >/'dir/foo.txt' : multi-pattern
touch foo.txt bar.txt;
- $* <'print {*.txt -bar.txt}' >'foo.txt' : exclude-match
+ $* <'print {*.txt -bar.txt}' >'foo.txt' : exclude-match
touch foo.txt bar.txt;
- $* <'print {*.txt -b*.txt}' >'foo.txt' : exclude-pattern
+ $* <'print {*.txt -b*.txt}' >'foo.txt' : exclude-pattern
+
+ touch foo.txt bar.txt baz.txt;
+ $* <'print {*.txt -{*z.txt bar.txt}}' >'foo.txt' : exclude-group
touch bar.txt;
- $* <'print {f*.txt +bar.txt}' >'bar.txt' : include-match
+ $* <'print {f*.txt +bar.txt}' >'bar.txt' : include-match
touch bar.txt;
- $* <'print {f*.txt +b*.txt}' >'bar.txt' : include-pattern
+ $* <'print {f*.txt +b*.txt}' >'bar.txt' : include-pattern
+
+ mkdir bar;
+ $* <'print {f*/ +{b*/}}' >/'bar/' : include-group
touch foo.txt fox.txt;
- $* <'print {*.txt -f*.txt +*x.txt}' >'fox.txt' : include-exclude-order
+ $* <'print {*.txt -f*.txt +*x.txt}' >'fox.txt' : include-exclude-order
}
: target-type