diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2021-06-30 13:23:51 +0300 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2021-06-30 13:23:51 +0300 |
commit | d1507101695f6bad35a61c4770b7d3913597ac16 (patch) | |
tree | 6e729dc87d81a0e8a5f9c41718f48bcd913540c7 /testsuite | |
parent | 86fc2872b33224cfa5442700c2a8abd020cbf900 (diff) |
awk: allow empty fuinctions with no arguments, disallow function redefinitions
function old new delta
.rodata 103681 103700 +19
parse_program 303 307 +4
evaluate 3145 3141 -4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 23/-4) Total: 19 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/awk.tests | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/awk.tests b/testsuite/awk.tests index 6e35d33dd..873cc3680 100755 --- a/testsuite/awk.tests +++ b/testsuite/awk.tests @@ -45,6 +45,16 @@ testing "awk handles empty function f(arg){}" \ "" "" prg=' +function empty_fun(){} +END {empty_fun() + print "Ok" +}' +testing "awk handles empty function f(){}" \ + "awk '$prg'" \ + "Ok\n" \ + "" "" + +prg=' function outer_fun() { return 1 } |