aboutsummaryrefslogtreecommitdiff
path: root/testsuite/awk.tests
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/awk.tests')
-rwxr-xr-xtestsuite/awk.tests20
1 files changed, 19 insertions, 1 deletions
diff --git a/testsuite/awk.tests b/testsuite/awk.tests
index 3933fefc9..0db6a26e4 100755
--- a/testsuite/awk.tests
+++ b/testsuite/awk.tests
@@ -280,6 +280,18 @@ testing "awk 'delete a[v--]' evaluates v-- once" \
280" \ 280" \
281 "" "" 281 "" ""
282 282
283testing "awk func arg parsing 1" \
284 "awk 'func f(,) { }' 2>&1" "awk: cmd. line:1: Unexpected token\n" "" ""
285
286testing "awk func arg parsing 2" \
287 "awk 'func f(a,,b) { }' 2>&1" "awk: cmd. line:1: Unexpected token\n" "" ""
288
289testing "awk func arg parsing 3" \
290 "awk 'func f(a,) { }' 2>&1" "awk: cmd. line:1: Unexpected token\n" "" ""
291
292testing "awk func arg parsing 4" \
293 "awk 'func f(a b) { }' 2>&1" "awk: cmd. line:1: Unexpected token\n" "" ""
294
283testing "awk handles empty ()" \ 295testing "awk handles empty ()" \
284 "awk 'BEGIN {print()}' 2>&1" "awk: cmd. line:1: Empty sequence\n" "" "" 296 "awk 'BEGIN {print()}' 2>&1" "awk: cmd. line:1: Empty sequence\n" "" ""
285 297
@@ -336,7 +348,13 @@ testing "awk continue" \
336 'BEGIN { if (1) continue; else a = 1 }' 348 'BEGIN { if (1) continue; else a = 1 }'
337 349
338testing "awk handles invalid for loop" \ 350testing "awk handles invalid for loop" \
339 "awk '{ for() }' 2>&1" "awk: cmd. line:1: Unexpected token\n" "" "" 351 "awk -e '{ for() }' 2>&1" "awk: cmd. line:1: Unexpected token\n" "" ""
352
353testing "awk handles colon not preceded by ternary" \
354 "awk -e foo:bar: 2>&1" "awk: cmd. line:1: Unexpected token\n" "" ""
355
356testing "awk errors on missing delete arg" \
357 "awk -e '{delete}' 2>&1" "awk: cmd. line:1: Too few arguments\n" "" ""
340 358
341# testing "description" "command" "result" "infile" "stdin" 359# testing "description" "command" "result" "infile" "stdin"
342testing 'awk negative field access' \ 360testing 'awk negative field access' \