From 09563d56b4e854501c03f16dd5f7d84979475e26 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sat, 5 Nov 2011 10:11:57 +0100 Subject: add pp-test Signed-off-by: Florian Pritz --- pp-test | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 pp-test (limited to 'pp-test') diff --git a/pp-test b/pp-test new file mode 100755 index 0000000..736aede --- /dev/null +++ b/pp-test @@ -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 -- cgit v1.2.3-24-g4f1b