aboutsummaryrefslogtreecommitdiff
path: root/testsuite/awk.tests
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/awk.tests')
-rwxr-xr-xtestsuite/awk.tests12
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/awk.tests b/testsuite/awk.tests
index 03fedf771..0db6a26e4 100755
--- a/testsuite/awk.tests
+++ b/testsuite/awk.tests
@@ -280,6 +280,18 @@ testing "awk 'delete a[v--]' evaluates v-- once" \
" \
"" ""
+testing "awk func arg parsing 1" \
+ "awk 'func f(,) { }' 2>&1" "awk: cmd. line:1: Unexpected token\n" "" ""
+
+testing "awk func arg parsing 2" \
+ "awk 'func f(a,,b) { }' 2>&1" "awk: cmd. line:1: Unexpected token\n" "" ""
+
+testing "awk func arg parsing 3" \
+ "awk 'func f(a,) { }' 2>&1" "awk: cmd. line:1: Unexpected token\n" "" ""
+
+testing "awk func arg parsing 4" \
+ "awk 'func f(a b) { }' 2>&1" "awk: cmd. line:1: Unexpected token\n" "" ""
+
testing "awk handles empty ()" \
"awk 'BEGIN {print()}' 2>&1" "awk: cmd. line:1: Empty sequence\n" "" ""