diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-12-22 18:04:08 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-12-22 18:10:50 +0100 |
commit | badf683b0aa693de9b1a7c1634ad20665463c503 (patch) | |
tree | c0d98441715a00b73971743e49f4c82c90beaf9b /testsuite/dc.tests | |
parent | 5daa1a0adfe08bae588e5293686a84ab3649a2aa (diff) | |
download | busybox-w32-badf683b0aa693de9b1a7c1634ad20665463c503.tar.gz busybox-w32-badf683b0aa693de9b1a7c1634ad20665463c503.tar.bz2 busybox-w32-badf683b0aa693de9b1a7c1634ad20665463c503.zip |
dc: unbreak interactive mode - was trying to get next tokens instead of executing
function old new delta
zbc_program_read - 268 +268
zdc_program_printStream - 146 +146
zbc_program_exec 4046 4182 +136
zdc_program_execStr 472 512 +40
zdc_parse_exprs_until_eof - 26 +26
zbc_vm_process 740 765 +25
zbc_lex_next 2225 2240 +15
zdc_parse_expr 569 535 -34
zbc_program_pushArray 147 - -147
zdc_program_asciify 370 - -370
------------------------------------------------------------------------------
(add/remove: 3/2 grow/shrink: 4/1 up/down: 656/-551) Total: 105 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to '')
-rwxr-xr-x | testsuite/dc.tests | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/dc.tests b/testsuite/dc.tests index 8edfa07ca..cb2dcbc23 100755 --- a/testsuite/dc.tests +++ b/testsuite/dc.tests | |||
@@ -41,6 +41,21 @@ testing "dc complex without spaces (multiple args)" \ | |||
41 | "16\n" \ | 41 | "16\n" \ |
42 | "" "" | 42 | "" "" |
43 | 43 | ||
44 | testing "dc '>a' (conditional execute string) 1" \ | ||
45 | "dc" \ | ||
46 | "1\n9\n" \ | ||
47 | "" "[1p]sa [2p]sb 1 2>a\n9p" | ||
48 | |||
49 | testing "dc '>a' (conditional execute string) 2" \ | ||
50 | "dc" \ | ||
51 | "9\n" \ | ||
52 | "" "[1p]sa [2p]sb 2 1>a\n9p" | ||
53 | |||
54 | testing "dc '>aeb' (conditional execute string with else)" \ | ||
55 | "dc" \ | ||
56 | "2\n9\n" \ | ||
57 | "" "[1p]sa [2p]sb 2 1>aeb\n9p" | ||
58 | |||
44 | for f in dc_*.dc; do | 59 | for f in dc_*.dc; do |
45 | r="`basename "$f" .dc`_results.txt" | 60 | r="`basename "$f" .dc`_results.txt" |
46 | test -f "$r" || continue | 61 | test -f "$r" || continue |