brandizzi icon

Skipping some scripts

brandizzi | PRO | 08/02/18 11:13:13 AM UTC | 0 ⭐ | 1307 👁️ | Never ⏰ | []
Bash |

410 B

|

None

|

0 👍

/

0 👎

for l in examples/*.lox
do
  if [ -e $l.skip ]
  then
    echo SKIP $l
    continue
  fi
 
  out=$(mktemp)
  err=$(mktemp)
  java -classpath target/classes/ br.com.brandizzi.adam.myjlox.Lox $l > $out 2> $err
 
  if ! diff $l.out $out
  then
    FAIL=1
  fi
 
  if ! diff $l.err $err
  then
    FAIL=1
  fi
 
  if [ "$FAIL" = "1" ]
  then
    echo "FAIL" $l
  else
    echo "PASS" $l
  fi
done

Comments