aboutsummaryrefslogtreecommitdiffstats
path: root/test/ccured_olden/treeadd/testit
blob: 031c54bd8faa67731ed2335be45633e73e38c970 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
# test a treeadd binary

if [ "$1" = "" ]; then
  echo "usage: $0 ./treeadd.exe"
  exit
fi

# all of treeadd's output is to stderr
echo "running: $1 21 1 2>output"
if ! $1 21 1 2>output; then
  echo "$1 failed directly"
  exit 2
fi

if ! diff out.orig output >out.diff; then
  echo "$1 got the wrong answer. See out.diff"
  exit 4
else
  echo "$1 seems to work"
fi