Testing suite updated

This commit is contained in:
Scarlett
2025-03-26 12:45:05 -04:00
parent 0c8c3e30f3
commit 5aefd319ae
20 changed files with 573 additions and 172 deletions

View File

@ -5,6 +5,11 @@
# The Translators - Spring 2025 #
TOK_DIR="out"
RED='\033[0;31m'
GREEN='\033[0;32m'
WHITE='\033[0m'
PURPLE='\033[0;35m'
ORANGE='\033[0;33m'
if [[ ! -d "$TOK_DIR" ]]; then
echo "Directory $TOK_DIR does not exist."
@ -19,9 +24,15 @@ for file in "$TOK_DIR"/*; do
exp="./tests/sprint$num/expected/$filename.expected"
if [[ -f "$exp" ]]; then
echo -e "--------------------------------------------"
echo -e "Checking $file...\n"
diff --color=always "$file" "$exp"
echo -e "--------------------------------------------\n"
diff -q "$file" "$exp" > /dev/null
if [[ $? -eq 0 ]]; then
echo -e "${GREEN}[✔] ${PURPLE}$filename ${WHITE}passed."
else
echo -e "\n${RED}[✘] ${PURPLE}$file ${WHITE}failed with an unexpected value..."
diff --color=always "$file" "$exp"
echo -e ""
fi
else
echo -e "${ORANGE}[-] ${PURPLE}$filename ${WHITE}does not have an expected value."
fi
done