aboutsummaryrefslogtreecommitdiff
path: root/testsuite/awk.tests
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/awk.tests')
-rwxr-xr-xtestsuite/awk.tests9
1 files changed, 2 insertions, 7 deletions
diff --git a/testsuite/awk.tests b/testsuite/awk.tests
index 3cddb4dd4..f53b1efe2 100755
--- a/testsuite/awk.tests
+++ b/testsuite/awk.tests
@@ -379,19 +379,14 @@ testing "awk -e and ARGC" \
379 "" 379 ""
380SKIP= 380SKIP=
381 381
382# The examples are in fact not valid awk programs (break/continue
383# can only be used inside loops).
384# But we do accept them outside of loops.
385# We had a bug with misparsing "break ; else" sequence.
386# Test that *that* bug is fixed, using simplest possible scripts:
387testing "awk break" \ 382testing "awk break" \
388 "awk -f - 2>&1; echo \$?" \ 383 "awk -f - 2>&1; echo \$?" \
389 "0\n" \ 384 "awk: -:1: 'break' not in a loop\n1\n" \
390 "" \ 385 "" \
391 'BEGIN { if (1) break; else a = 1 }' 386 'BEGIN { if (1) break; else a = 1 }'
392testing "awk continue" \ 387testing "awk continue" \
393 "awk -f - 2>&1; echo \$?" \ 388 "awk -f - 2>&1; echo \$?" \
394 "0\n" \ 389 "awk: -:1: 'continue' not in a loop\n1\n" \
395 "" \ 390 "" \
396 'BEGIN { if (1) continue; else a = 1 }' 391 'BEGIN { if (1) continue; else a = 1 }'
397 392