From 6116f1dafa412d6ac6da347719f7ddae57b5e446 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 4 Aug 2014 19:52:50 +0100 Subject: 32954 plus new test: [[ ... = ...(#q...) ]] shouldn't force a glob. The (#q...) expression should simply be removed to leave a normal pattern as before --- Test/D02glob.ztst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Test') diff --git a/Test/D02glob.ztst b/Test/D02glob.ztst index 358c93413..4697ca414 100644 --- a/Test/D02glob.ztst +++ b/Test/D02glob.ztst @@ -533,14 +533,12 @@ 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 (){ print $#@ } glob.tmp/dir*(Y1) @@ -562,3 +560,8 @@ >Globs before last path component >Respects qualifiers >Argument required + + [[ "ce fichier n'existe pas" = (#b)ce\ (f[^ ]#)\ *s(#q./) ]] + print $match[1] +0:(#q) is ignored completely in conditional pattern matching +>fichier -- cgit 1.4.1