about summary refs log tree commit diff
path: root/Test/D06subscript.ztst
diff options
context:
space:
mode:
authordana <dana@dana.is>2018-01-18 15:57:56 -0600
committerPeter Stephenson <p.stephenson@samsung.com>2018-05-14 16:54:19 +0100
commitb066cc3ea99fbb2d5b2c5882d17a679c52f2114b (patch)
treec09b6619e5e98a2e87449be581fe9065013f5e2a /Test/D06subscript.ztst
parent449f13a46738ff303e41a8fcad1df850cae721fd (diff)
downloadzsh-b066cc3ea99fbb2d5b2c5882d17a679c52f2114b.tar.gz
zsh-b066cc3ea99fbb2d5b2c5882d17a679c52f2114b.tar.xz
zsh-b066cc3ea99fbb2d5b2c5882d17a679c52f2114b.zip
42297: (e) subscript flag needs extra work with scalars
Diffstat (limited to 'Test/D06subscript.ztst')
-rw-r--r--Test/D06subscript.ztst16
1 files changed, 16 insertions, 0 deletions
diff --git a/Test/D06subscript.ztst b/Test/D06subscript.ztst
index f0a858b1c..3ea7fb7e4 100644
--- a/Test/D06subscript.ztst
+++ b/Test/D06subscript.ztst
@@ -273,3 +273,19 @@
  print ${string[1,twoarg(1,4)]}
 0:Commas inside parentheses do not confuse subscripts
 >abc
+
+  string='foobarbaz foob?rbaz foob?rbaz'
+  print $string[(i)b?r] $string[(I)b?r]
+  print $string[(r)b?r] $string[(R)b?r]
+  print $string[(r)b?r,(R)b?r]
+  print $string[(ei)b?r] $string[(eI)b?r]
+  print $string[(er)b?r] $string[(eR)b?r]
+  print $string[(er)b?r,(eR)b?r]
+0:Pattern handling with scalars
+F:Regression test for workers/42297
+>4 24
+>b b
+>barbaz foob?rbaz foob?r
+>14 24
+>b b
+>b?rbaz foob?r