about summary refs log tree commit diff
path: root/Test/D02glob.ztst
diff options
context:
space:
mode:
authorPeter Stephenson <p.w.stephenson@ntlworld.com>2014-06-01 20:55:39 +0100
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2014-06-01 20:55:39 +0100
commit501f2003a89673cebc956ec5aa5f4f401b3a8f5f (patch)
tree22b93c8461fbf6a9de5ff234bfd8f3292a8ab896 /Test/D02glob.ztst
parent880020ca2ed8207fe39aa95169a6f9226ff7b8dc (diff)
downloadzsh-501f2003a89673cebc956ec5aa5f4f401b3a8f5f.tar.gz
zsh-501f2003a89673cebc956ec5aa5f4f401b3a8f5f.tar.xz
zsh-501f2003a89673cebc956ec5aa5f4f401b3a8f5f.zip
32640: (#q) in [[ ... ]] forces globbing
Diffstat (limited to 'Test/D02glob.ztst')
-rw-r--r--Test/D02glob.ztst15
1 files changed, 15 insertions, 0 deletions
diff --git a/Test/D02glob.ztst b/Test/D02glob.ztst
index 1f8f65286..3e1ea8210 100644
--- a/Test/D02glob.ztst
+++ b/Test/D02glob.ztst
@@ -526,3 +526,18 @@
 >+bus+bus matches +(+bus|-car)
 >@sinhats matches @(@sinhats|wrensinfens)
 >!kerror matches !(!somethingelse)
+
+  (
+    setopt extendedglob
+    cd glob.tmp
+    [[ -n a*(#qN) ]] && print File beginning with a
+    [[ -z z*(#qN) ]] && print No file beginning with z
+    [[ "a b c" = ?(#q) ]] && print Multiple files matched
+    setopt nonomatch
+    [[ -n z*(#q) ]] && print Normal string if nullglob not set
+  )
+0:Force glob expansion in conditions using (#q)
+>File beginning with a
+>No file beginning with z
+>Multiple files matched
+>Normal string if nullglob not set