summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
Diffstat (limited to 'Test')
-rw-r--r--Test/B02typeset.ztst21
1 files changed, 21 insertions, 0 deletions
diff --git a/Test/B02typeset.ztst b/Test/B02typeset.ztst
index 2edbb0b5e..57a7caa12 100644
--- a/Test/B02typeset.ztst
+++ b/Test/B02typeset.ztst
@@ -487,3 +487,24 @@
 ?typeset -r pbro
 ?0
 ?(eval):10: read-only variable: pbro
+
+  readonly foo=bar novalue
+  readonly -p
+0:readonly -p output (no readonly specials)
+>typeset -r foo=bar
+>typeset -r novalue=''
+
+  local -a a1 a2
+  local -r r1=yes r2=no
+  a1=(one two) a2=(three four)
+  readonly a1
+  typeset -pm 'a[12]'
+  typeset -pm 'r[12]'
+0:readonly -p output
+>typeset -a a1
+>a1=(one two)
+>typeset -ar a1
+>typeset -a a2
+>a2=(three four)
+>typeset -r r1=yes
+>typeset -r r2=no