From 728f2adfc8daf2c65c5d4130a903635a58c99fb5 Mon Sep 17 00:00:00 2001
From: Peter Stephenson
Date: Sat, 30 Sep 2017 13:35:19 +0100
Subject: Add typeset -p1, like typeset -p with newlines
---
Test/B02typeset.ztst | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
(limited to 'Test')
diff --git a/Test/B02typeset.ztst b/Test/B02typeset.ztst
index 13f0d5e30..996af064f 100644
--- a/Test/B02typeset.ztst
+++ b/Test/B02typeset.ztst
@@ -793,3 +793,29 @@
local -A keyvalhash=(1 one [2]=two 3 three)
1:Mixed syntax with [key]=val not allowed for hash.
?(eval):1: bad [key]=value syntax for associative array
+
+ local -a myarray
+ typeset -p1 myarray
+ myarray=("&" sand '""' "" plugh)
+ typeset -p1 myarray
+0:typeset -p1 output for array
+>typeset -a myarray=()
+>typeset -a myarray=(
+> '&'
+> sand
+> '""'
+> ''
+> plugh
+>)
+
+ local -A myhash
+ typeset -p1 myhash
+ myhash=([one]=two [three]= [four]="[]")
+ typeset -p1 myhash
+0:typeset -p1 output for associative array
+>typeset -A myhash=()
+>typeset -A myhash=(
+> [four]='[]'
+> [one]=two
+> [three]=''
+>)
--
cgit 1.4.1