From d7354df169603807fe2ac4f8a0f9f72c9703184f Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 30 Jun 2021 12:52:51 +0200 Subject: awk: evaluate all, even superfluous function args function old new delta evaluate 3128 3135 +7 Signed-off-by: Denys Vlasenko --- testsuite/awk.tests | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'testsuite') diff --git a/testsuite/awk.tests b/testsuite/awk.tests index 873cc36..3c23039 100755 --- a/testsuite/awk.tests +++ b/testsuite/awk.tests @@ -87,11 +87,17 @@ BEGIN { a=2 print v (a) }' -testing "'v (a)' is not a function call, it is a concatenation" \ +testing "awk 'v (a)' is not a function call, it is a concatenation" \ "awk '$prg' 2>&1" \ "12\n" \ "" "" +prg='func f(){print"F"};func g(){print"G"};BEGIN{f(g(),g())}' +testing "awk unused function args are evaluated" \ + "awk '$prg' 2>&1" \ + "G\nG\nF\n" \ + "" "" + optional DESKTOP testing "awk hex const 1" "awk '{ print or(0xffffffff,1) }'" "4294967295\n" "" "\n" -- cgit v1.1