#!/bin/bash


FAILURE=0
CODEBASE_PATH=$(dirname $0)
cd ${CODEBASE_PATH}
for test in {termstr/,fill3/,lscolors/,}tests/*_test.py; do
    echo "Testing $test …"
    ${test} 2>&1
    FAILURE=$(($FAILURE | $?))
    echo
done
if [ $FAILURE -eq 0 ]; then
    echo -e "\e[32m"  # Green
    echo "Tests passed."
else
    echo -e "\e[91m"  # Red
    echo "Tests failed."
fi
echo -e "\e[39m"  # Normal
exit $FAILURE
