about summary refs log tree commit diff
path: root/Test/D04parameter.ztst
diff options
context:
space:
mode:
Diffstat (limited to 'Test/D04parameter.ztst')
-rw-r--r--Test/D04parameter.ztst29
1 files changed, 29 insertions, 0 deletions
diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst
index 7c6a465af..46565a121 100644
--- a/Test/D04parameter.ztst
+++ b/Test/D04parameter.ztst
@@ -1302,3 +1302,32 @@
 >6
 >9
 >1 2 3 4 5 6 7 8 9
+
+   testfn() {
+     emulate -L sh
+     set -A foo 1 2 3
+     set -- 1 2 3
+     str=abc
+     echo ${foo[*]:0:1}
+     echo ${foo[*]:1:1}
+     echo ${foo[*]: -1:1}
+     :
+     echo ${*:0:1}
+     echo ${*:1:1}
+     echo ${*: -1:1}
+     :
+     echo ${str:0:1}
+     echo ${str:1:1}
+     echo ${str: -1:1}
+   }
+   testfn
+0:Bash-style subscripts, Bourne-style indexing
+>1
+>2
+>3
+>testfn
+>1
+>3
+>a
+>b
+>c