summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorDenys Vlasenko2018-12-29 02:40:03 +0100
committerDenys Vlasenko2018-12-29 03:08:12 +0100
commitd5b0fa6abf725cc9281f3b11fc2a4c0f12df0793 (patch)
tree695632ded5b8e73a7eb53cc3b426ea6d2d5f2ab0 /testsuite
parente16a5223d20e5715b98e1fd21fa8d59e75e4e793 (diff)
downloadbusybox-d5b0fa6abf725cc9281f3b11fc2a4c0f12df0793.zip
busybox-d5b0fa6abf725cc9281f3b11fc2a4c0f12df0793.tar.gz
bc: more fixes for unusual input bases
function old new delta zxc_program_num 990 1020 +30 zxc_lex_number 172 202 +30 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 60/0) Total: 60 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/bc_numbers2.bc18
-rw-r--r--testsuite/bc_numbers2_results.txt50
2 files changed, 68 insertions, 0 deletions
diff --git a/testsuite/bc_numbers2.bc b/testsuite/bc_numbers2.bc
new file mode 100644
index 0000000..208fe0d
--- /dev/null
+++ b/testsuite/bc_numbers2.bc
@@ -0,0 +1,18 @@
+define f() {
+ "ibase:";ibase
+ a=A;a
+ a=F;a
+ a=G;a
+ a=Z;a
+ a=0A;a
+ a=0F;a
+ a=0G;a
+ a=0Z;a
+}
+f()
+ibase=9;f()
+ibase=A;f()
+ibase=F;f()
+ibase=G;f()
+#ibase=Z;f()
+halt
diff --git a/testsuite/bc_numbers2_results.txt b/testsuite/bc_numbers2_results.txt
new file mode 100644
index 0000000..e3400bd
--- /dev/null
+++ b/testsuite/bc_numbers2_results.txt
@@ -0,0 +1,50 @@
+ibase:10
+10
+15
+16
+35
+10
+15
+16
+35
+0
+ibase:9
+10
+15
+16
+35
+10
+15
+16
+35
+0
+ibase:10
+10
+15
+16
+35
+10
+15
+16
+35
+0
+ibase:15
+10
+15
+16
+35
+10
+15
+16
+35
+0
+ibase:16
+10
+15
+16
+35
+10
+15
+16
+35
+0