diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-12-20 16:48:50 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-12-20 16:48:50 +0100 |
commit | 5acd14ba5b911aff28cb259cabdb84c5f8233e55 (patch) | |
tree | d771515f2720eac81d997996aa39d35394afc0fc /testsuite/bc.tests | |
parent | 503faf9d5331b70d93836d221ff12f97d769499b (diff) | |
download | busybox-w32-5acd14ba5b911aff28cb259cabdb84c5f8233e55.tar.gz busybox-w32-5acd14ba5b911aff28cb259cabdb84c5f8233e55.tar.bz2 busybox-w32-5acd14ba5b911aff28cb259cabdb84c5f8233e55.zip |
bc: fix keyword matching to not think "ifz" is the "if" keyword
function old new delta
zbc_lex_next 2224 2225 +1
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to '')
-rwxr-xr-x | testsuite/bc.tests | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/testsuite/bc.tests b/testsuite/bc.tests index e303cf6ae..d33f8c90a 100755 --- a/testsuite/bc.tests +++ b/testsuite/bc.tests | |||
@@ -76,6 +76,11 @@ testing "bc while(cond)<NL>" \ | |||
76 | "8\n7\n6\n5\n4\n3\n2\n1\n9\n" \ | 76 | "8\n7\n6\n5\n4\n3\n2\n1\n9\n" \ |
77 | "" "i=9;while(--i)\ni\n9" | 77 | "" "i=9;while(--i)\ni\n9" |
78 | 78 | ||
79 | testing "bc ifz does not match if keyword" \ | ||
80 | "bc" \ | ||
81 | "1\n2\n2\n3\n" \ | ||
82 | "" "ifz=1;ifz\n++ifz;ifz++\nifz" | ||
83 | |||
79 | testing "bc print 1,2,3" \ | 84 | testing "bc print 1,2,3" \ |
80 | "bc" \ | 85 | "bc" \ |
81 | "123" \ | 86 | "123" \ |