summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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