View difference between Paste ID: arAxZYAN and MM30zc01
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
  elif [ ! -e $l.out ] || [ ! -e $l.err ]
8
  then
9
    echo missing $l.out or $l.err
10
    exit 1
11
  fi
12
13
  out=$(mktemp)
14
  err=$(mktemp)
15
  java -classpath target/classes/ br.com.brandizzi.adam.myjlox.Lox $l > $out 2> $err
16
17
  if ! diff $l.out $out
18
  then
19
    FAIL=1
20
  fi
21
22
  if ! diff $l.err $err
23
  then
24
    FAIL=1
25
  fi
26
27
  if [ "$FAIL" = "1" ]
28
  then
29
    echo "FAIL" $l
30
  else
31
    echo "PASS" $l
32
  fi
33
done