diff options
author | Florian Pritz <bluewind@xinu.at> | 2011-11-05 10:11:57 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2011-11-05 10:11:57 +0100 |
commit | 09563d56b4e854501c03f16dd5f7d84979475e26 (patch) | |
tree | dfdaeeed301d0dd8d310a5fe8c93f49dbfd81116 /pp-test | |
parent | 523b47ba579089de73958e3459b1d12bd4628486 (diff) | |
download | bin-09563d56b4e854501c03f16dd5f7d84979475e26.tar.gz bin-09563d56b4e854501c03f16dd5f7d84979475e26.tar.xz |
add pp-test
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'pp-test')
-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 |