summaryrefslogtreecommitdiffstats
path: root/Test/D06subscript.ztst
diff options
context:
space:
mode:
Diffstat (limited to 'Test/D06subscript.ztst')
-rw-r--r--Test/D06subscript.ztst15
1 files changed, 15 insertions, 0 deletions
diff --git a/Test/D06subscript.ztst b/Test/D06subscript.ztst
index 57cdc027c..42748577d 100644
--- a/Test/D06subscript.ztst
+++ b/Test/D06subscript.ztst
@@ -308,3 +308,18 @@ F:In math, (($i)) should be the same as ((i)), see workers/47748.
F:Regression test for inconsistency of failed (i) on zero-length string
>2
>1
+
+ string='foo bar baz'
+ for 1 in 0 1 2 3 4 -1 -2 -3 -4; do
+ print -r - $1 $string[(w)$1]
+ done
+0:(w)
+>0
+>1 foo
+>2 bar
+>3 baz
+>4
+>-1 baz
+>-2 bar
+>-3 foo
+>-4