summaryrefslogtreecommitdiff
path: root/test/runtests.sh
diff options
context:
space:
mode:
authorErin van der Veen2017-10-02 13:47:40 +0200
committerErin van der Veen2017-10-02 13:47:40 +0200
commit3fcfa44baea71670ccdd5fd3448fff2ff5e5c772 (patch)
tree3dae3935dcbd01005013701a454c812956d50385 /test/runtests.sh
parentStart the skeleton of the 'Manual Testing' & 'Automated Testing' sections. (diff)
Remove Camil's manual test 1.in; Run manual tests automatically
Diffstat (limited to 'test/runtests.sh')
-rw-r--r--test/runtests.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/runtests.sh b/test/runtests.sh
new file mode 100644
index 0000000..e9a54c6
--- /dev/null
+++ b/test/runtests.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+RED='\033[0;31m'
+GREEN='\033[0;32m'
+RESET='\033[0;30m'
+
+for f in database/*.in;
+do
+ output=$(diff "${f/in/out}" <(../src/runchess < "$f"))
+ if [ "$output" = "" ]
+ then
+ echo -e "${GREEN}Test $(basename $f .in) passed${RESET}"
+ else
+ echo -e "${RED}Test $(basename $f .in) failed${RESET}"
+ fi
+done