#!/bin/sh

set -e

SMALLTESTCOUNT=10
PATH=$PATH:/usr/games

echo "smalltest:"
deal -I "line tests/input/sample.line" -i format/ddline $SMALLTESTCOUNT > test.out
head -$SMALLTESTCOUNT tests/output/sample.ddline > correct.out
diff test.out correct.out
if cmp test.out correct.out ; then echo PASS; else echo FAIL  ; fi

echo "great88:"
deal -x tests/great88 | fgrep FAIL || echo "PASSED"
