about summary refs log tree commit diff
path: root/Test/D02glob.ztst
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2016-01-19 09:55:46 +0000
committerPeter Stephenson <pws@zsh.org>2016-01-19 09:55:46 +0000
commit8eb9070d6785f423dd9bdbbb0513aa47c8a08d62 (patch)
tree412d2d74ceabd14860d313e9338de48e7b5d8291 /Test/D02glob.ztst
parentd0cd9032d8b46051b490790a30e87a1e87c86670 (diff)
downloadzsh-8eb9070d6785f423dd9bdbbb0513aa47c8a08d62.tar.gz
zsh-8eb9070d6785f423dd9bdbbb0513aa47c8a08d62.tar.xz
zsh-8eb9070d6785f423dd9bdbbb0513aa47c8a08d62.zip
37678: Now possible to quote "-" in pattern range
Diffstat (limited to 'Test/D02glob.ztst')
-rw-r--r--Test/D02glob.ztst40
1 files changed, 40 insertions, 0 deletions
diff --git a/Test/D02glob.ztst b/Test/D02glob.ztst
index f944a4fbd..89256e303 100644
--- a/Test/D02glob.ztst
+++ b/Test/D02glob.ztst
@@ -582,3 +582,43 @@
 >1 OK
 >2 OK
 >3 OK
+
+  [[ foo = 'f'\o"o" ]]
+0:Stripping of quotes from patterns (1)
+
+  [[ foo = 'f'('o'|'a')('o'|'b') ]]
+0:Stripping of quotes from patterns (2)
+
+  [[ fob = 'f'('o'|'a')('o'|'b') ]]
+0:Stripping of quotes from patterns (3)
+
+  [[ fab = 'f'('o'|'a')('o'|'b') ]]
+0:Stripping of quotes from patterns (4)
+
+  [[ fib != 'f'('o'|'a')('o'|'b') ]]
+0:Stripping of quotes from patterns (4)
+
+  [[ - != [a-z] ]]
+0:- is a special character in ranges
+
+  [[ - = ['a-z'] ]]
+0:- is not a special character in ranges if quoted
+
+  [[ b-1 = [a-z]-[0-9] ]]
+0:- untokenized following a bracketed subexpression
+
+  [[ b-1 = []a-z]-[]0-9] ]]
+0:- "]" after "[" is normal range character and - still works
+
+  headremove="bcdef"
+  print ${headremove#[a-z]}
+0:active - works in pattern in parameter
+>cdef
+
+  headremove="bcdef"
+  print ${headremove#['a-z']}
+  headremove="-cdef"
+  print ${headremove#['a-z']}
+0:quoted - works in pattern in parameter
+>bcdef
+>cdef