summaryrefslogtreecommitdiff
path: root/shell/hush_test/hush-parsing
diff options
context:
space:
mode:
Diffstat (limited to 'shell/hush_test/hush-parsing')
-rw-r--r--shell/hush_test/hush-parsing/groups_and_keywords2.right3
-rwxr-xr-xshell/hush_test/hush-parsing/groups_and_keywords2.tests9
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 0000000..ae74a5d
--- /dev/null
+++ b/shell/hush_test/hush-parsing/groups_and_keywords2.right
@@ -0,0 +1,3 @@
+hush: syntax error: unexpected )
+Fail:2
+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 0000000..ab33b90
--- /dev/null
+++ b/shell/hush_test/hush-parsing/groups_and_keywords2.tests
@@ -0,0 +1,9 @@
+# This is an error
+(eval 'if() { echo; }')
+echo Fail:$?
+# ^^^^^^ bash prints 1, but interactively it sets $? = 2
+# we print 2
+
+# This is an error, and it aborts in script
+if() { echo; }
+echo Not reached