#!/usr/bin/env bash return_code=0 for file in tests/*.obja; do echo -n "Testing $file... " ./obja.py $file > /dev/null 2>&1 if [ $? -eq 0 ]; then echo -e '\033[32mSUCCESS\033[0m' else echo -e '\033[31mFAILURE\033[0m' return_code=1 fi done # objb files should fail for file in tests/*.objb; do echo -n "Testing $file... " ./obja.py $file > /dev/null 2>&1 if [ $? -eq 0 ]; then echo -e '\033[31mFAILURE\033[0m' return_code=1 else echo -e '\033[32mSUCCESS\033[0m' fi done exit $return_code