From 39b28980f38e83e15cdeb19a489b5659af97fe93 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 18 Jun 2015 14:54:41 +0100 Subject: various posts: Implement assignment parsing for typeset. Typeset assignments now work like raw assignments except for no "+=" and no GLOB_ASSIGN. Documented in typeset builtin doc and mentioned in release notes. Tests to ensure basic sanity. Enabled by default, can be turned off by "disable -r" with typeset family of commands. --- Test/E01options.ztst | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Test/E01options.ztst') diff --git a/Test/E01options.ztst b/Test/E01options.ztst index d64f7ac68..ca3f06ca8 100644 --- a/Test/E01options.ztst +++ b/Test/E01options.ztst @@ -570,6 +570,15 @@ >unset >globassign + # This test is now somewhat artificial as + # KSH_TYPESET only applies to the builtin + # interface. Tests to the more standard + # reserved word interface appear elsewhere. + ( + # reserved words are handled during parsing, + # hence eval... + disable -r typeset + eval ' setopt kshtypeset ktvars=(ktv1 ktv2) typeset ktfoo=`echo arg1 arg2` $ktvars @@ -580,6 +589,8 @@ print $noktfoo print $+noktarg1 $+noktarg2 unset ktfoo ktv1 ktv2 noktfoo noktarg2 + ' + ) 0:KSH_TYPESET option >1 1 0 >arg1 arg2 -- cgit 1.4.1