aboutsummaryrefslogtreecommitdiff
path: root/testsuite/bc.tests
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-12-12 21:41:40 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2018-12-12 21:41:40 +0100
commit9a23b07c4c0d06c40d7c0ce91c5fdf7c8449ac49 (patch)
tree9b1a85084b1e046b0a5b5eb06375334ef1eb2f56 /testsuite/bc.tests
parentd6ad3666dc51f475a6e76b07f2c59d039f69f2d4 (diff)
downloadbusybox-w32-9a23b07c4c0d06c40d7c0ce91c5fdf7c8449ac49.tar.gz
busybox-w32-9a23b07c4c0d06c40d7c0ce91c5fdf7c8449ac49.tar.bz2
busybox-w32-9a23b07c4c0d06c40d7c0ce91c5fdf7c8449ac49.zip
testsuite: add bc and dc tests
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite/bc.tests')
-rwxr-xr-xtestsuite/bc.tests19
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/bc.tests b/testsuite/bc.tests
new file mode 100755
index 000000000..32460092b
--- /dev/null
+++ b/testsuite/bc.tests
@@ -0,0 +1,19 @@
1#!/bin/sh
2# Copyright 2018 by Denys Vlasenko
3# Licensed under GPLv2 or later, see file LICENSE in this source tree.
4
5. ./testing.sh
6
7tar xJf bc_large.tar.xz
8
9for f in bc*.bc; do
10 r="`basename "$f" .bc`_results.txt"
11 test -f "$r" || continue
12 # testing "test name" "command" "expected result" "file input" "stdin"
13 testing "bc -lq $f" \
14 "{ { bc -lq $f 2>&1; echo E:\$? >&2; } | diff -u - $r; echo E:\$?; } 2>&1" \
15 "E:0\nE:0\n" \
16 "" ""
17done
18
19exit $FAILCOUNT