23 lines
479 B
Bash
23 lines
479 B
Bash
|
|
# Test if the parser is correctly reading in faces with 3 indices.
|
|
# Map Versions as of : 4:26 PM 4/8/2017
|
|
|
|
function test () {
|
|
if [ "$1" == "$2" ]; then
|
|
echo "test passed"
|
|
else
|
|
echo "test failed"
|
|
echo $2
|
|
fi
|
|
}
|
|
|
|
# test parser will read in the data and output it in the same format.
|
|
dir="cases"
|
|
for each in "$dir"/*
|
|
do
|
|
echo "$each"
|
|
ansr=$(cat $each)
|
|
test=$(./test-parser --face $each 0)
|
|
test $ansr $test
|
|
done
|