diff options
author | Erin van der Veen | 2017-10-02 13:47:40 +0200 |
---|---|---|
committer | Erin van der Veen | 2017-10-02 13:47:40 +0200 |
commit | 3fcfa44baea71670ccdd5fd3448fff2ff5e5c772 (patch) | |
tree | 3dae3935dcbd01005013701a454c812956d50385 /test/runtests.sh | |
parent | Start 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.sh | 15 |
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 |