diff options
author | Denys Vlasenko | 2019-01-01 21:50:14 +0100 |
---|---|---|
committer | Denys Vlasenko | 2019-01-01 21:50:14 +0100 |
commit | 2231468a2f28e99cb6b65dc40da044e37af16ed1 (patch) | |
tree | 5c465febbb98e80314452e6114e3c4b78d36a381 /testsuite | |
parent | ff65355b8a44d1d546443f69382459eb2176cb44 (diff) | |
download | busybox-2231468a2f28e99cb6b65dc40da044e37af16ed1.zip busybox-2231468a2f28e99cb6b65dc40da044e37af16ed1.tar.gz |
bc: upstream fixes
function old new delta
bc_parse_expr_empty_ok 1764 1843 +79
bc_error_at - 62 +62
bc_parse_inst_isLeaf - 30 +30
zbc_func_insert 100 120 +20
bc_error_bad_function_definition - 10 +10
bc_error_bad_assignment - 10 +10
zxc_lex_next 1608 1614 +6
ok_in_expr 30 - -30
zxc_vm_process 874 839 -35
------------------------------------------------------------------------------
(add/remove: 4/1 grow/shrink: 3/1 up/down: 217/-65) Total: 152 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/bc.tests | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/bc.tests b/testsuite/bc.tests index 1d45455..13525ea 100755 --- a/testsuite/bc.tests +++ b/testsuite/bc.tests @@ -108,6 +108,11 @@ testing "bc define auto" \ "8\n9\n" \ "" "define w() { auto z; return 8; }; w(); 9" +testing "bc define auto array same name" \ + "bc" \ + "8\n9\n" \ + "" "define w(x) { auto x[]; return x; }; w(8); 9" + testing "bc define with body on next line" \ "bc" \ "8\n9\n" \ @@ -133,6 +138,17 @@ testing "bc ifz does not match if keyword" \ "1\n2\n2\n3\n" \ "" "ifz=1;ifz\n++ifz;ifz++\nifz" +# had parse error on "f()-N" +testing "bc -l 'e(0)-2'" \ + "bc -l" \ + "-1.00000000000000000000\n" \ + "" "e(0)-2" + +testing "bc (!a&&b)" \ + "bc" \ + "0\n" \ + "" "(!a&&b)" + testing "bc print 1,2,3" \ "bc" \ "123" \ |