aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/name/pattern.testscript44
1 files changed, 26 insertions, 18 deletions
diff --git a/tests/name/pattern.testscript b/tests/name/pattern.testscript
index efd15b2..acad250 100644
--- a/tests/name/pattern.testscript
+++ b/tests/name/pattern.testscript
@@ -105,62 +105,70 @@ 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
touch foo.txt;
- $* <'print {+*.txt}' >'foo.txt' : plus-prefixed
+ $* <'print {+*.txt}' >'foo.txt' : plus-prefixed
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-non-pattern
+ $* <'print {*.txt -bar.txt}' >'foo.txt' : exclude-non-pattern
mkdir baz;
touch foo.txt bar.txt baz/fox.txt baz/box.txt;
- $* <'print {**.txt -b*.txt -b*/*}' >'foo.txt' : exclude-pattern
+ $* <'print {**.txt -b*.txt -b*/*}' >'foo.txt' : exclude-pattern
touch foo.txt bar.txt baz.txt;
- $* <'print {*.txt -{*z.txt bar.txt}}' >'foo.txt' : exclude-group
+ $* <'print {*.txt -{*z.txt bar.txt}}' >'foo.txt' : exclude-group
touch bar.txt;
- $* <'print {f*.txt +bar.txt}' >'bar.txt' : include-non-wildcard
+ $* <'print {f*.txt +bar.txt}' >'bar.txt' : include-non-wildcard
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
+ $* <'print {f*/ +{b*/}}' >/'bar/' : include-group
mkdir -p foo/bar;
$* <'print $path.canonicalize(foo/{+{b*/}})' >/'foo/bar/' : include-group-first
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
touch foo.txt;
- $* <'print {+foo.txt} {+bar.txt}' >'foo.txt' : non-wildcard
+ $* <'print {+foo.txt} {+bar.txt}' >'foo.txt' : non-wildcard
+
+ mkdir -p foo/bar;
+ touch foo/bar/baz.txt;
+ $* <'print {$src_base/foo/**}' >/"$~/foo/bar/baz.txt" : abs-path-pattern
+
+ mkdir -p foo/bar;
+ touch foo/bar/baz.txt;
+ $* <'print $src_base/foo/{**}' >/"$~/foo/bar/baz.txt" : abs-start-dir
}
: escaping