test.sh 429 Bytes
Newer Older
pm3g19's avatar
pm3g19 committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
PROBLEM=$1
INPUT=$2
TESTCASES=~/dev/plc/testCases
EXEC_DIR=~/dev/plc
cd $TESTCASES/pr$PROBLEM/inputs/input$INPUT
echo "Expected:"
EXP=$(cat $TESTCASES/pr$PROBLEM/expected/exp$INPUT.txt)
cat $TESTCASES/pr$PROBLEM/expected/exp$INPUT.txt
echo "Got:"
GOT=$($EXEC_DIR/csvql $EXEC_DIR/pr$PROBLEM.cql)
$EXEC_DIR/csvql $EXEC_DIR/pr$PROBLEM.cql

if [ "$EXP" = "$GOT" ];
then
    echo "Test passed"
else
    echo "Test failed"
fi