aboutsummaryrefslogtreecommitdiff
path: root/testsuite/awk.tests
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/awk.tests')
-rwxr-xr-xtestsuite/awk.tests19
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/awk.tests b/testsuite/awk.tests
index 82937bc10..ad0583afb 100755
--- a/testsuite/awk.tests
+++ b/testsuite/awk.tests
@@ -261,6 +261,25 @@ end d
261" \ 261" \
262 "" "" 262 "" ""
263 263
264prg='
265BEGIN{
266cnt = 0
267a[cnt] = "zeroth"
268a[++cnt] = "first"
269delete a[cnt--]
270print cnt
271print "[0]:" a[0]
272print "[1]:" a[1]
273}'
274testing "awk 'delete a[v--]' evaluates v-- once" \
275 "awk '$prg'" \
276 "\
2770
278[0]:zeroth
279[1]:
280" \
281 "" ""
282
264testing "awk handles empty ()" \ 283testing "awk handles empty ()" \
265 "awk 'BEGIN {print()}' 2>&1" "awk: cmd. line:1: Empty sequence\n" "" "" 284 "awk 'BEGIN {print()}' 2>&1" "awk: cmd. line:1: Empty sequence\n" "" ""
266 285