From 2fb1a9f13c0c465c41d8c08366fb8c41dccf2880 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 22 Aug 2005 11:43:58 +0000 Subject: 21678: Unsetting tied parameters caused various crashes --- Test/D04parameter.ztst | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'Test') diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst index 7f2ed4670..6623ebd24 100644 --- a/Test/D04parameter.ztst +++ b/Test/D04parameter.ztst @@ -568,6 +568,40 @@ >0 >/elsewhere /somewhere + local STRING=a:b + typeset -T STRING string + print $STRING $string + unset STRING + set -A string x y z + print $STRING $string + STRING=a:b + typeset -T STRING string + print $STRING $string + unset STRING + set -A string x y z + print $STRING $string + STRING=a:b + typeset -T STRING string + print $STRING $string + unset string + STRING=x:y:z + print $STRING $string + STRING=a:b + typeset -T STRING string + print $STRING $string + unset string + STRING=x:y:z + print $STRING $string +0:Unsetting and recreation of tied normal parameters +>a:b a b +>x y z +>a:b a b +>x y z +>a:b a b +>x:y:z +>a:b a b +>x:y:z + string='look for a match in here' if [[ ${string%%(#b)(match)*} = "look for a " ]]; then print $match[1] $mbegin[1] $mend[1] $string[$mbegin[1],$mend[1]] -- cgit 1.4.1