diff options
Diffstat (limited to 'tests/files/bc/script.sh')
-rw-r--r-- | tests/files/bc/script.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/files/bc/script.sh b/tests/files/bc/script.sh new file mode 100644 index 00000000..d279b6a2 --- /dev/null +++ b/tests/files/bc/script.sh @@ -0,0 +1,24 @@ +#! /bin/sh + +if [ "$#" -lt 4 ]; then + echo "usage: script.sh <bc> <test_output1> <test_output2> <script>" + exit 1 +fi + +set -e + +bc="$1" +shift + +out1="$1" +shift + +out2="$1" +shift + +script="$1" + +echo "quit" | bc -lq "$script" > "$out1" +echo "quit" | "$bc" -lq "$script" > "$out2" + +diff "$out1" "$out2" |