summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Src/text.c2
-rw-r--r--Test/B02typeset.ztst12
3 files changed, 17 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 0295d5a2b..f3be8cf1b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2015-06-24 Peter Stephenson <p.stephenson@samsung.com>
+ * 35590: Src/text.c, Test/B02typeset.ztst: tweak and
+ test text output for typeset.
+
* various culminating in 35586, c.f. commits on typeset-array
branch: Config/version.mk, Doc/Zsh/builtins.yo,
Doc/Zsh/grammar.yo, Doc/Zsh/options.yo, NEWS, README,
diff --git a/Src/text.c b/Src/text.c
index a72ab33e6..3287c54ac 100644
--- a/Src/text.c
+++ b/Src/text.c
@@ -189,6 +189,8 @@ taddassign(wordcode code, Estate state, int typeset)
static void
taddassignlist(Estate state, wordcode count)
{
+ if (count)
+ taddchr(' ');
while (count--) {
wordcode code = *state->pc++;
taddassign(code, state, 1);
diff --git a/Test/B02typeset.ztst b/Test/B02typeset.ztst
index 4afb18962..e6285bc05 100644
--- a/Test/B02typeset.ztst
+++ b/Test/B02typeset.ztst
@@ -651,3 +651,15 @@
>odd
>number
>here
+
+ fn() { typeset foo bar thing=this stuff=(that other) more=woevva; }
+ which -x2 fn
+ fn2() { typeset assignfirst=(why not); }
+ which -x2 fn2
+0:text output from typeset
+>fn () {
+> typeset foo bar thing=this stuff=(that other) more=woevva
+>}
+>fn2 () {
+> typeset assignfirst=(why not)
+>}