diff --git a/check.t b/check.t index 6942140..e3b363a 100644 --- a/check.t +++ b/check.t @@ -1,4 +1,4 @@ -# $MirOS: src/bin/mksh/check.t,v 1.590 2013/02/10 23:32:18 tg Exp $ +# $MirOS: src/bin/mksh/check.t,v 1.591 2013/02/10 23:36:21 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 $ @@ -9787,6 +9787,19 @@ expected-stdout: ia baz : . oa baz . --- +name: funsub-2 +description: + You can now reliably use local and return in funsubs + (not exit though) +stdin: + x=q; e=1; x=${ echo a; e=2; echo x$e;}; echo 1:y$x,$e,$?. + x=q; e=1; x=${ echo a; typeset e=2; echo x$e;}; echo 2:y$x,$e,$?. + x=q; e=1; x=${ echo a; typeset e=2; return 3; echo x$e;}; echo 3:y$x,$e,$?. +expected-stdout: + 1:ya x2,2,0. + 2:ya x2,1,0. + 3:ya,1,3. +--- name: test-stnze-1 description: Check that the short form [ $x ] works