Apply patch from: Steffen "Daode" Nurpmeso for testing -i vs. EXIT trap

This commit is contained in:
tg 2013-07-25 16:41:30 +00:00
parent 861890f7fa
commit 5b35b869f1

23
check.t
View File

@ -1,4 +1,4 @@
# $MirOS: src/bin/mksh/check.t,v 1.622 2013/07/25 16:06:43 tg Exp $
# $MirOS: src/bin/mksh/check.t,v 1.623 2013/07/25 16:41:30 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 $
@ -6120,6 +6120,27 @@ expected-stdout:
EXtrap
= noeval-undef 1 .
---
name: exit-trap-interactive
description:
Check that interactive shell doesn't exit via EXIT trap on syntax error
arguments: !-i!
stdin:
trap -- EXIT
echo Syntax error <
echo 'After error 1'
trap 'echo Exit trap' EXIT
echo Syntax error <
echo 'After error 2'
trap 'echo Exit trap' EXIT
exit
echo 'After exit'
expected-stdout:
After error 1
After error 2
Exit trap
expected-stderr-pattern:
/syntax error: 'newline' unexpected/
---
name: test-stlt-1
description:
Check that test also can handle string1 < string2 etc.