diff options
Diffstat (limited to 'tests/runner.bash')
| -rwxr-xr-x | tests/runner.bash | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/runner.bash b/tests/runner.bash new file mode 100755 index 0000000..32af554 --- /dev/null +++ b/tests/runner.bash @@ -0,0 +1,22 @@ +#!/bin/bash +passed=0 +total=0 +for item in $(find . -name *.neb) +do + expected=$(tail -1 $item | sed 's/; //') + actual=$(python3 ../neb.py $item) + if [[ "$expected" == "$actual" ]]; then + ((passed=passed+1)) + else + echo "$item... FAILED" + echo " Expected: $expected" + echo " Actual: $actual" + echo "" + fi + ((total=total+1)) +done + +pct=$(python -c "print('{:.2f}'.format($passed / float($total) * 100))") + +echo "Total: $total" +echo "Passed: $passed ($pct%)" |
