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>
This commit is contained in:
Denys Vlasenko
2018-12-20 16:48:50 +01:00
parent 503faf9d53
commit 5acd14ba5b
2 changed files with 7 additions and 0 deletions

View File

@@ -76,6 +76,11 @@ testing "bc while(cond)<NL>" \
"8\n7\n6\n5\n4\n3\n2\n1\n9\n" \
"" "i=9;while(--i)\ni\n9"
testing "bc ifz does not match if keyword" \
"bc" \
"1\n2\n2\n3\n" \
"" "ifz=1;ifz\n++ifz;ifz++\nifz"
testing "bc print 1,2,3" \
"bc" \
"123" \