diff options
author | Denys Vlasenko | 2018-12-12 21:41:40 +0100 |
---|---|---|
committer | Denys Vlasenko | 2018-12-12 21:41:40 +0100 |
commit | 9a23b07c4c0d06c40d7c0ce91c5fdf7c8449ac49 (patch) | |
tree | 9b1a85084b1e046b0a5b5eb06375334ef1eb2f56 /testsuite/bc_misc1.bc | |
parent | d6ad3666dc51f475a6e76b07f2c59d039f69f2d4 (diff) | |
download | busybox-9a23b07c4c0d06c40d7c0ce91c5fdf7c8449ac49.zip busybox-9a23b07c4c0d06c40d7c0ce91c5fdf7c8449ac49.tar.gz |
testsuite: add bc and dc tests
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite/bc_misc1.bc')
-rw-r--r-- | testsuite/bc_misc1.bc | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/testsuite/bc_misc1.bc b/testsuite/bc_misc1.bc new file mode 100644 index 0000000..7e9d966 --- /dev/null +++ b/testsuite/bc_misc1.bc @@ -0,0 +1,76 @@ +define x(x) { + return(x) +} +define y() { + return; +} +define z() { + return (); +} +scale = 0 +x=2 +x[0]=3 +x +x[0] +scale +ibase +obase +x ( 7 ) +x + x( 8 ) +x - x[0] +321 * x +2 ^ x[0] +x++ +--x +x += 9 +x +length(2381) +sqrt(9) +scale(238.1) +x=2 +x[0]=3 +(x) +(x[0]) +(scale) +(ibase) +(obase) +(x ( 7 )) +(x + x( 8 )) +(x - x[0]) +(321 * x) +(2 ^ x[0]) +(x++) +(--x) +(x += 9) +(length(2381)) +(sqrt(9)) +(scale(238.1)) +(scale = 0) +(x = 10) +(x += 100) +(x -= 10) +(x *= 10) +(x /= 100) +(x ^= 10) +(x = sqrt(x)) +(x[1 - 1]) +x[(1 - 1)] +2 + \ +3 +++ibase +--ibase +++obase +--obase +++last +--last +last +last = 100 +last +. = 150 +. +++scale +--scale +y() +z() +2 + /* +*/3 |