diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2021-06-29 12:16:36 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2021-06-29 12:16:36 +0200 |
commit | 6872c193a935df47facf717c15a32f93b43c6bcf (patch) | |
tree | 6710abc0886289331f56a36a983389d7a18b2fc4 /testsuite | |
parent | 686287b5da98508dd03fb295745c82d00440131e (diff) | |
download | busybox-w32-6872c193a935df47facf717c15a32f93b43c6bcf.tar.gz busybox-w32-6872c193a935df47facf717c15a32f93b43c6bcf.tar.bz2 busybox-w32-6872c193a935df47facf717c15a32f93b43c6bcf.zip |
awk: fix parsing of expressions such as "v (a)"
function old new delta
next_token 812 825 +13
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/awk.tests | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/awk.tests b/testsuite/awk.tests index cf9b722dc..6e35d33dd 100755 --- a/testsuite/awk.tests +++ b/testsuite/awk.tests | |||
@@ -71,6 +71,17 @@ testing "awk properly handles undefined function" \ | |||
71 | "L1\n\nawk: cmd. line:5: Call to undefined function\n" \ | 71 | "L1\n\nawk: cmd. line:5: Call to undefined function\n" \ |
72 | "" "" | 72 | "" "" |
73 | 73 | ||
74 | prg=' | ||
75 | BEGIN { | ||
76 | v=1 | ||
77 | a=2 | ||
78 | print v (a) | ||
79 | }' | ||
80 | testing "'v (a)' is not a function call, it is a concatenation" \ | ||
81 | "awk '$prg' 2>&1" \ | ||
82 | "12\n" \ | ||
83 | "" "" | ||
84 | |||
74 | 85 | ||
75 | optional DESKTOP | 86 | optional DESKTOP |
76 | testing "awk hex const 1" "awk '{ print or(0xffffffff,1) }'" "4294967295\n" "" "\n" | 87 | testing "awk hex const 1" "awk '{ print or(0xffffffff,1) }'" "4294967295\n" "" "\n" |