From 7b8f207cc9936d27f957115957dc50b5ee888370 Mon Sep 17 00:00:00 2001 From: tg Date: Thu, 15 Oct 2009 16:15:03 +0000 Subject: [PATCH] new exec-function-environment-1 replacing exec-simple-1 from posh, after reading SUSv4 throughoutly cf. Message-ID: --- check.t | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/check.t b/check.t index 282e763..fc88e09 100644 --- a/check.t +++ b/check.t @@ -1,4 +1,4 @@ -# $MirOS: src/bin/mksh/check.t,v 1.328 2009/10/15 15:32:34 tg Exp $ +# $MirOS: src/bin/mksh/check.t,v 1.329 2009/10/15 16:15:03 tg Exp $ # $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $ # $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $ # $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $ @@ -4018,6 +4018,17 @@ stdin: FOO=bar exec; env | $sortprog | grep -v '^RANDOM=' >bar2 cmp -s bar1 bar2 --- +name: exec-function-environment-1 +description: + Check assignments in function calls and whether they affect + the current execution environment (ksh93, SUSv4) +stdin: + f() { a=2; }; g() { b=3; echo y$c-; }; a=1 f; b=2; c=1 g + echo x$a-$b- z$c- +expected-stdout: + y1- + x2-3- z1- +--- name: xxx-what-do-you-call-this-1 stdin: echo "${foo:-"a"}*"