about summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
Diffstat (limited to 'Test')
-rw-r--r--Test/D06subscript.ztst20
1 files changed, 20 insertions, 0 deletions
diff --git a/Test/D06subscript.ztst b/Test/D06subscript.ztst
index cffca742e..f91d62f2f 100644
--- a/Test/D06subscript.ztst
+++ b/Test/D06subscript.ztst
@@ -249,3 +249,23 @@
   string[0]=!
 1:Can't set only element zero of string
 ?(eval):1: string: assignment to invalid subscript range
+
+  string="Life,+like+a+dome+of+many-colour'd+glass"
+  for delims in "()" "{}" "[]" "<>"; do
+    eval 'print ${string[(ws'$delims[1]'+'$delims[2]')2]}'
+    eval 'print $string[(ws'$delims[1]'+'$delims[2]')3]'
+    eval 'print "$string[(ws'$delims[1]'+'$delims[2]')4]"'
+  done
+0:Check matched delimiters in subscripts
+>like
+>a
+>dome
+>like
+>a
+>dome
+>like
+>a
+>dome
+>like
+>a
+>dome