diff options
-rwxr-xr-x | pp-test | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -0,0 +1,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 |