about summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2014-06-03 23:46:07 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2014-06-03 23:46:07 -0700
commit9381bb6a2d3abd4a4c6871b5676f9fb04f42d921 (patch)
tree428f7a3e070e9a693424f0fdd91759b0f40a986a /Test
parent5cfe18670c889ebe841fd50d12346350ef603d5c (diff)
downloadzsh-9381bb6a2d3abd4a4c6871b5676f9fb04f42d921.tar.gz
zsh-9381bb6a2d3abd4a4c6871b5676f9fb04f42d921.tar.xz
zsh-9381bb6a2d3abd4a4c6871b5676f9fb04f42d921.zip
32694: the number of matches to find is the suffix argument of (Y) qualifier
Diffstat (limited to 'Test')
-rw-r--r--Test/D02glob.ztst23
1 files changed, 14 insertions, 9 deletions
diff --git a/Test/D02glob.ztst b/Test/D02glob.ztst
index 9e29de26e..c00bbe339 100644
--- a/Test/D02glob.ztst
+++ b/Test/D02glob.ztst
@@ -543,17 +543,22 @@
 >Multiple files matched
 >Normal string if nullglob not set
 
- (){ print $#@ } glob.tmp/dir*(Y)
- (){ print $#@ } glob.tmp/file*(NY)
- (){ [[ $1 = glob.tmp/dir? ]] && echo "(Y) returns a matching filename" } glob.tmp/dir*(Y)
- # Can be negated
- (){ print $@:t } glob.tmp/dir*(Y^Y)
- (){ [[ $#@ -eq 1 ]] && print Globs before last path component } glob.tmp/dir?/subdir(NY)
- (){ [[ $#@ -eq 0 ]] && print Respects qualifiers } glob.tmp/dir?/subdir(NY.)
+ (){ print $#@ } glob.tmp/dir*(Y1)
+ (){ print $#@ } glob.tmp/file*(NY1)
+ (){ [[ "$*" == */dir?\ */dir? ]] && print Returns matching filenames } glob.tmp/dir*(Y2)
+ (){ print "Limit is upper bound:" $@:t } glob.tmp/dir*(Y5)
+ (){ print "Negated:" $@:t } glob.tmp/dir*(Y1^Y)
+ (){ print "Sorting:" $@:t } glob.tmp/dir*(Y4On)
+ (){ [[ $#@ -eq 1 ]] && print Globs before last path component } glob.tmp/dir?/subdir(NY1)
+ (){ [[ $#@ -eq 0 ]] && print Respects qualifiers } glob.tmp/dir*(NY1.)
+ (print -- *(Y)) 2>/dev/null || print "Argument required"
 0:short-circuit modifier
 >1
 >0
->(Y) returns a matching filename
->dir1 dir2 dir3 dir4
+>Returns matching filenames
+>Limit is upper bound: dir1 dir2 dir3 dir4
+>Negated: dir1 dir2 dir3 dir4
+>Sorting: dir4 dir3 dir2 dir1
 >Globs before last path component
 >Respects qualifiers
+>Argument required