diff options
Diffstat (limited to 'shell/hush_test')
-rw-r--r-- | shell/hush_test/hush-parsing/groups_and_keywords2.right | 3 | ||||
-rwxr-xr-x | shell/hush_test/hush-parsing/groups_and_keywords2.tests | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/shell/hush_test/hush-parsing/groups_and_keywords2.right b/shell/hush_test/hush-parsing/groups_and_keywords2.right new file mode 100644 index 000000000..ae74a5db9 --- /dev/null +++ b/shell/hush_test/hush-parsing/groups_and_keywords2.right | |||
@@ -0,0 +1,3 @@ | |||
1 | hush: syntax error: unexpected ) | ||
2 | Fail:2 | ||
3 | hush: syntax error: unexpected ) | ||
diff --git a/shell/hush_test/hush-parsing/groups_and_keywords2.tests b/shell/hush_test/hush-parsing/groups_and_keywords2.tests new file mode 100755 index 000000000..ab33b909f --- /dev/null +++ b/shell/hush_test/hush-parsing/groups_and_keywords2.tests | |||
@@ -0,0 +1,9 @@ | |||
1 | # This is an error | ||
2 | (eval 'if() { echo; }') | ||
3 | echo Fail:$? | ||
4 | # ^^^^^^ bash prints 1, but interactively it sets $? = 2 | ||
5 | # we print 2 | ||
6 | |||
7 | # This is an error, and it aborts in script | ||
8 | if() { echo; } | ||
9 | echo Not reached | ||