aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.bash
diff options
context:
space:
mode:
authormryouse2022-07-05 03:24:49 +0000
committermryouse2022-07-05 03:24:49 +0000
commit2402523aa84780447e3ce0a8109a14e1286665c8 (patch)
tree8bb4792c24154defbb046ca17a879bbb01da94b0 /tests/runner.bash
parentdb0327ba8c9fae4a57f85f60e2f0bac438781b8e (diff)
parentcf0ae625ddc9076e0ca02079b8d461de22244998 (diff)
Merge branch 'master' into feature/listtypes
Diffstat (limited to 'tests/runner.bash')
-rwxr-xr-xtests/runner.bash22
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%)"