aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2020-01-08 12:30:49 +0000
committerRon Yorston <rmy@pobox.com>2020-01-08 12:30:49 +0000
commita9271a8e97e6e7be5285330d5f19352decabf807 (patch)
treebf3c4464c369a15a46454792dac167505f74769f /testsuite
parentb0b7ab792bc1f45963f4b84b94faaf05054e1613 (diff)
parent9ec836c033fc6e55e80f3309b3e05acdf09bb297 (diff)
downloadbusybox-w32-a9271a8e97e6e7be5285330d5f19352decabf807.tar.gz
busybox-w32-a9271a8e97e6e7be5285330d5f19352decabf807.tar.bz2
busybox-w32-a9271a8e97e6e7be5285330d5f19352decabf807.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/bc.tests5
-rwxr-xr-xtestsuite/dc.tests35
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
190testing "bc comparison 1" \
191 "bc" \
192 "1\n" \
193 "" "-10 < -9"
194
190testing "bc nested loops and breaks" \ 195testing "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)" \
44optional FEATURE_DC_BIG 44optional FEATURE_DC_BIG
45# All tests below depend on FEATURE_DC_BIG 45# All tests below depend on FEATURE_DC_BIG
46 46
47testing "dc: x should execute strings" \
48 "dc -e'[40 2 +] x f'" \
49 "42\n" \
50 "" ""
51
52testing "dc: x should not execute or pop non-strings" \
53 "dc -e'42 x f'" \
54 "42\n" \
55 "" ""
56
57testing "dc: x should work with strings created from a" \
58 "dc -e'42 112 a x'" \
59 "42\n" \
60 "" ""
61
62testing "dc: p should print invalid escapes" \
63 "dc -e '[\q] p'" \
64 "\\q\n" \
65 "" ""
66
67testing "dc: p should print trailing backslashes" \
68 "dc -e '[q\] p'" \
69 "q\\\\\n" \
70 "" ""
71
72testing "dc: p should parse/print single backslashes" \
73 "dc -e '[\] p'" \
74 "\\\\\n" \
75 "" ""
76
77testing "dc: p should print single backslash strings" \
78 "dc -e '92 a p'" \
79 "\\\\\n" \
80 "" ""
81
47testing "dc read" \ 82testing "dc read" \
48 "dc -finput" \ 83 "dc -finput" \
49 "2\n9\n1\n" \ 84 "2\n9\n1\n" \