diff options
author | Qrius <[email protected]> | 2025-03-05 08:41:05 +0100 |
---|---|---|
committer | Qrius <[email protected]> | 2025-03-05 08:41:08 +0100 |
commit | 313e059f367f2ac291cd409e77d22673f9595848 (patch) | |
tree | 6440ebdd65e015f8c6b0147fd8eb5f877f35c34e /tests/test_unittests.sh | |
parent | 5fb097851d88b42188ee0502270d8c336102783a (diff) | |
download | skaldpress-313e059f367f2ac291cd409e77d22673f9595848.tar.gz skaldpress-313e059f367f2ac291cd409e77d22673f9595848.zip |
First iteration of py skaldpress version
Diffstat (limited to 'tests/test_unittests.sh')
-rwxr-xr-x | tests/test_unittests.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/test_unittests.sh b/tests/test_unittests.sh new file mode 100755 index 0000000..802cc49 --- /dev/null +++ b/tests/test_unittests.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +ALL_OUTPUT=0 + +test () { + python tests/unit_tests/$1 + if [ "$?" -eq "1" ]; then + tput setaf 1 + echo "$1 NOT OK:" + tput sgr0 + exit 1 + else + tput setaf 2 + echo "$1 OK" + tput sgr0 + fi +} + +if [ "$#" -eq 1 ]; then + ALL_OUTPUT=1 + test $1 +else + for file in tests/unit_tests/*; do + test "$(basename $file)" + done +fi + |