From 501f2003a89673cebc956ec5aa5f4f401b3a8f5f Mon Sep 17 00:00:00 2001
From: Peter Stephenson
Date: Sun, 1 Jun 2014 20:55:39 +0100
Subject: 32640: (#q) in [[ ... ]] forces globbing
---
Test/D02glob.ztst | 15 +++++++++++++++
1 file changed, 15 insertions(+)
(limited to 'Test')
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
--
cgit 1.4.1