summaryrefslogtreecommitdiff
path: root/testsuite/dc.tests
diff options
context:
space:
mode:
authorDenys Vlasenko2018-12-25 20:50:41 +0100
committerDenys Vlasenko2018-12-25 20:50:41 +0100
commit8fac1c77401478855fd0ac1a7fa64c371bd735cb (patch)
treeb5b49ac0dc1164052048c1c7481e23c91936ec29 /testsuite/dc.tests
parenta2e62e3e505aad4af81018f385d86d35e6485641 (diff)
downloadbusybox-8fac1c77401478855fd0ac1a7fa64c371bd735cb.zip
busybox-8fac1c77401478855fd0ac1a7fa64c371bd735cb.tar.gz
dc: add two tests
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite/dc.tests')
-rwxr-xr-xtestsuite/dc.tests10
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/dc.tests b/testsuite/dc.tests
index cb2dcbc..2756608 100755
--- a/testsuite/dc.tests
+++ b/testsuite/dc.tests
@@ -56,6 +56,16 @@ testing "dc '>aeb' (conditional execute string with else)" \
"2\n9\n" \
"" "[1p]sa [2p]sb 2 1>aeb\n9p"
+testing "dc space can be a register" \
+ "dc" \
+ "2\n9\n" \
+ "" "[2p]s \n[3p]\nl x\n9p"
+
+testing "dc newline can be a register" \
+ "dc" \
+ "2\n9\n" \
+ "" "[2p]s\n[3p]l\nx\n9p"
+
for f in dc_*.dc; do
r="`basename "$f" .dc`_results.txt"
test -f "$r" || continue