diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-03-17 15:20:41 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-03-17 15:20:41 +0200 |
commit | 9f93d058c363ef61802222d8a63a75b0643c8bf0 (patch) | |
tree | 6a299df723664e280f26879fd8e2640567dc3c84 /tests/name | |
parent | ee64fadec760e28945808720271866a3be4935e1 (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.test | 34 |
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 |