about summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorPeter Stephenson <p.w.stephenson@ntlworld.com>2013-12-16 22:20:06 +0000
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2013-12-16 22:20:06 +0000
commitdb23c630051fe330782cda4089a16de7ec579f29 (patch)
treea5116fd1f42c7d42b5490d169a054a344731bf82 /Test
parentf06851f50d78b17a45159976aa167682ffdb87c2 (diff)
downloadzsh-db23c630051fe330782cda4089a16de7ec579f29.tar.gz
zsh-db23c630051fe330782cda4089a16de7ec579f29.tar.xz
zsh-db23c630051fe330782cda4089a16de7ec579f29.zip
32136: fix problem with kshglob.
Non-pattern characters that could be followed by "(" to introduce
a ksh glob but weren't caused failures.
Diffstat (limited to 'Test')
-rw-r--r--Test/D02glob.ztst27
1 files changed, 27 insertions, 0 deletions
diff --git a/Test/D02glob.ztst b/Test/D02glob.ztst
index 81b002120..1f8f65286 100644
--- a/Test/D02glob.ztst
+++ b/Test/D02glob.ztst
@@ -499,3 +499,30 @@
   )
 0:No error with empty null glob with (N).
 >
+
+  (setopt kshglob
+   test_array=(
+     '+fours'    '+*'
+     '@titude'   '@*'
+     '!bang'     '!*'
+     # and check they work in the real kshglob cases too...
+     '+bus+bus'  '+(+bus|-car)'
+     '@sinhats'  '@(@sinhats|wrensinfens)'
+     '!kerror'   '!(!somethingelse)'
+     # and these don't match, to be sure
+     '+more'      '+(+less)'
+     '@all@all'   '@(@all)'
+     '!goesitall' '!(!goesitall)'
+   )
+   for str pat in $test_array; do
+     eval "[[ $str = $pat ]]" && print "$str matches $pat"
+   done
+   true
+  )
+0:kshglob option does not break +, @, ! without following open parenthesis
+>+fours matches +*
+>@titude matches @*
+>!bang matches !*
+>+bus+bus matches +(+bus|-car)
+>@sinhats matches @(@sinhats|wrensinfens)
+>!kerror matches !(!somethingelse)