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>
This commit is contained in:
Denys Vlasenko
2021-07-02 22:28:51 +02:00
parent 8bb03da906
commit 4d902ea9de
2 changed files with 27 additions and 18 deletions

View File

@@ -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