summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2011-11-05 10:11:57 +0100
committerFlorian Pritz <bluewind@xinu.at>2011-11-05 10:11:57 +0100
commit09563d56b4e854501c03f16dd5f7d84979475e26 (patch)
treedfdaeeed301d0dd8d310a5fe8c93f49dbfd81116
parent523b47ba579089de73958e3459b1d12bd4628486 (diff)
downloadbin-09563d56b4e854501c03f16dd5f7d84979475e26.tar.gz
bin-09563d56b4e854501c03f16dd5f7d84979475e26.tar.xz
add pp-test
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-xpp-test21
1 files changed, 21 insertions, 0 deletions
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