aboutsummaryrefslogtreecommitdiff
path: root/tests/files/bc/script.sh
blob: d279b6a2f090425a831dbd2184ee69bfe4c7779f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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"