diff options
author | Ron Yorston <rmy@pobox.com> | 2020-01-08 12:30:49 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2020-01-08 12:30:49 +0000 |
commit | a9271a8e97e6e7be5285330d5f19352decabf807 (patch) | |
tree | bf3c4464c369a15a46454792dac167505f74769f /testsuite | |
parent | b0b7ab792bc1f45963f4b84b94faaf05054e1613 (diff) | |
parent | 9ec836c033fc6e55e80f3309b3e05acdf09bb297 (diff) | |
download | busybox-w32-a9271a8e97e6e7be5285330d5f19352decabf807.tar.gz busybox-w32-a9271a8e97e6e7be5285330d5f19352decabf807.tar.bz2 busybox-w32-a9271a8e97e6e7be5285330d5f19352decabf807.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/bc.tests | 5 | ||||
-rwxr-xr-x | testsuite/dc.tests | 35 |
2 files changed, 40 insertions, 0 deletions
diff --git a/testsuite/bc.tests b/testsuite/bc.tests index 3fde60a2c..179d5d2a2 100755 --- a/testsuite/bc.tests +++ b/testsuite/bc.tests | |||
@@ -187,6 +187,11 @@ testing "bc { print 1 }" \ | |||
187 | "1" \ | 187 | "1" \ |
188 | "" "{ print 1 }" | 188 | "" "{ print 1 }" |
189 | 189 | ||
190 | testing "bc comparison 1" \ | ||
191 | "bc" \ | ||
192 | "1\n" \ | ||
193 | "" "-10 < -9" | ||
194 | |||
190 | testing "bc nested loops and breaks" \ | 195 | testing "bc nested loops and breaks" \ |
191 | "bc" \ | 196 | "bc" \ |
192 | "\ | 197 | "\ |
diff --git a/testsuite/dc.tests b/testsuite/dc.tests index 8c3af4156..361bc8459 100755 --- a/testsuite/dc.tests +++ b/testsuite/dc.tests | |||
@@ -44,6 +44,41 @@ testing "dc complex without spaces (multiple args)" \ | |||
44 | optional FEATURE_DC_BIG | 44 | optional FEATURE_DC_BIG |
45 | # All tests below depend on FEATURE_DC_BIG | 45 | # All tests below depend on FEATURE_DC_BIG |
46 | 46 | ||
47 | testing "dc: x should execute strings" \ | ||
48 | "dc -e'[40 2 +] x f'" \ | ||
49 | "42\n" \ | ||
50 | "" "" | ||
51 | |||
52 | testing "dc: x should not execute or pop non-strings" \ | ||
53 | "dc -e'42 x f'" \ | ||
54 | "42\n" \ | ||
55 | "" "" | ||
56 | |||
57 | testing "dc: x should work with strings created from a" \ | ||
58 | "dc -e'42 112 a x'" \ | ||
59 | "42\n" \ | ||
60 | "" "" | ||
61 | |||
62 | testing "dc: p should print invalid escapes" \ | ||
63 | "dc -e '[\q] p'" \ | ||
64 | "\\q\n" \ | ||
65 | "" "" | ||
66 | |||
67 | testing "dc: p should print trailing backslashes" \ | ||
68 | "dc -e '[q\] p'" \ | ||
69 | "q\\\\\n" \ | ||
70 | "" "" | ||
71 | |||
72 | testing "dc: p should parse/print single backslashes" \ | ||
73 | "dc -e '[\] p'" \ | ||
74 | "\\\\\n" \ | ||
75 | "" "" | ||
76 | |||
77 | testing "dc: p should print single backslash strings" \ | ||
78 | "dc -e '92 a p'" \ | ||
79 | "\\\\\n" \ | ||
80 | "" "" | ||
81 | |||
47 | testing "dc read" \ | 82 | testing "dc read" \ |
48 | "dc -finput" \ | 83 | "dc -finput" \ |
49 | "2\n9\n1\n" \ | 84 | "2\n9\n1\n" \ |