summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorDenys Vlasenko2021-07-02 22:28:51 +0200
committerDenys Vlasenko2021-07-02 22:28:51 +0200
commit4d902ea9def573cd15271177abbfa50fbf30c84f (patch)
tree17d9b8646d86f570506e9cc7b9098734620fc7cf /testsuite
parent8bb03da906e1f8f750123214b15a19d7d4e166c1 (diff)
downloadbusybox-4d902ea9def573cd15271177abbfa50fbf30c84f.zip
busybox-4d902ea9def573cd15271177abbfa50fbf30c84f.tar.gz
awk: fix beavior of "exit" without parameter
function old new delta evaluate 3336 3339 +3 awk_exit 93 94 +1 awk_main 829 827 -2 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 4/-2) Total: 2 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/awk.tests5
1 files changed, 5 insertions, 0 deletions
diff --git a/testsuite/awk.tests b/testsuite/awk.tests
index 3c23039..770d8ff 100755
--- a/testsuite/awk.tests
+++ b/testsuite/awk.tests
@@ -445,4 +445,9 @@ testing 'awk $NF is empty' \
'' \
'a=====123='
+testing "awk exit N propagates through END's exit" \
+ "awk 'BEGIN { exit 42 } END { exit }'; echo \$?" \
+ "42\n" \
+ '' ''
+
exit $FAILCOUNT