From bfe7bff95490bf4d4f1d82eeb9be40cea718521c Mon Sep 17 00:00:00 2001 From: tg Date: Sun, 23 Mar 2008 20:43:51 +0000 Subject: [PATCH] add regression test self-tests --- check.t | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/check.t b/check.t index 008b853..31c8da7 100644 --- a/check.t +++ b/check.t @@ -1,4 +1,4 @@ -# $MirOS: src/bin/mksh/check.t,v 1.158 2008/03/05 18:21:44 tg Exp $ +# $MirOS: src/bin/mksh/check.t,v 1.159 2008/03/23 20:43:51 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 $ @@ -15,6 +15,32 @@ stdin: echo $KSH_VERSION name: KSH_VERSION --- +name: selftest-1 +description: + Regression test self-testing +stdin: + print ${foo:-baz} +expected-stdout: + baz +--- +name: selftest-2 +description: + Regression test self-testing +env-setup: !foo=bar! +stdin: + print ${foo:-baz} +expected-stdout: + bar +--- +name: selftest-3 +description: + Regression test self-testing +env-setup: !ENV=fnord! +stdin: + print "<$ENV>" +expected-stdout: + +--- name: alias-1 description: Check that recursion is detected/avoided in aliases.