blob: 736aede592773b379d1faaf120ab9e9f54275f99 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/bin/sh
prog="$1"
realpath="$(readlink -f "$prog")"
workdir=${realpath%/*}
basepath=${workdir##*/}
cd $workdir
javac $prog.java || exit 1
i=1
while [[ -e "$basepath.i$i" ]]; do
echo "testing $basepath.i$i"
java -ea "$prog" < "$basepath.i$i" > tmpout
dos2unix tmpout
diff -Nua "$basepath.o$i" tmpout
rm tmpout
((i++));
done
|