aboutsummaryrefslogtreecommitdiff
path: root/testsuite/dc.tests (follow)
Commit message (Collapse)AuthorAgeFilesLines
* dc: Parse error & fix out of bounds read in xc_program_printStringBrian Foley2019-09-051-0/+20
| | | | | | | | function old new delta xc_program_print 712 735 +23 Signed-off-by: Brian Foley <bpfoley@google.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* dc: Fix segfault when executing strings generated using asciifyBrian Foley2019-09-051-0/+5
| | | | | | | | function old new delta zxc_vm_process 6884 6891 +7 Signed-off-by: Brian Foley <bpfoley@google.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* dc: execute shouldn't pop if stack head is not a stringBrian Foley2019-09-051-0/+10
| | | | | | | | | | | | | | This matches the behaviour of both GNU dc (as specified in its man page), and BSD dc (where stack_popstring() pops only if the head is a string.) Add a couple of tests to verify this behavior. function old new delta zxc_vm_process 6882 6884 +2 Signed-off-by: Brian Foley <bpfoley@google.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* dc.tests: fix two test case to also depend on DC_BIGChen Qi2019-04-191-3/+3
| | | | | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* dc: fit returning of stringDenys Vlasenko2019-01-041-0/+5
| | | | | | | function old new delta zxc_program_exec 4087 4098 +11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* dc: fix '?'Denys Vlasenko2019-01-041-0/+5
| | | | | | | | | | function old new delta zdc_parse_expr 470 479 +9 zxc_vm_process 839 814 -25 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 9/-25) Total: -16 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bc: rename config optionsDenys Vlasenko2018-12-281-0/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* dc: add two testsDenys Vlasenko2018-12-251-0/+10
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* dc: unbreak interactive mode - was trying to get next tokens instead of ↵Denys Vlasenko2018-12-221-0/+15
| | | | | | | | | | | | | | | | | | | | 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>
* testsuite: add bc and dc testsDenys Vlasenko2018-12-121-0/+20
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* dc: fix testsuiteDenys Vlasenko2018-12-061-18/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* dc: tweak parsingBernhard Reutner-Fischer2015-02-161-0/+56
https://bugs.debian.org/538685 dc requires whitespace between language elements. We were requiring 1 2 + p instead of the abbreviated 1 2+p (for example). function old new delta stack_machine 97 126 +29 dc_main 117 79 -38 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 29/-38) Total: -9 bytes Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>