SHOW:
|
|
- or go back to the newest paste.
| 1 | for l in examples/*.lox | |
| 2 | do | |
| 3 | if [ -e $l.skip ] | |
| 4 | then | |
| 5 | echo SKIP $l | |
| 6 | continue | |
| 7 | fi | |
| 8 | ||
| 9 | out=$(mktemp) | |
| 10 | err=$(mktemp) | |
| 11 | java -classpath target/classes/ br.com.brandizzi.adam.myjlox.Lox $l > $out 2> $err | |
| 12 | ||
| 13 | if ! diff $l.out $out | |
| 14 | then | |
| 15 | FAIL=1 | |
| 16 | fi | |
| 17 | ||
| 18 | if ! diff $l.err $err | |
| 19 | then | |
| 20 | FAIL=1 | |
| 21 | fi | |
| 22 | ||
| 23 | if [ "$FAIL" = "1" ] | |
| 24 | then | |
| 25 | echo "FAIL" $l | |
| 26 | else | |
| 27 | echo "PASS" $l | |
| 28 | fi | |
| 29 | done |