add regression test self-tests

This commit is contained in:
tg 2008-03-23 20:43:51 +00:00
parent df9b1b9b84
commit bfe7bff954
1 changed files with 27 additions and 1 deletions

28
check.t
View File

@ -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:
<fnord>
---
name: alias-1
description:
Check that recursion is detected/avoided in aliases.