27 lines
650 B
Bash
Executable File
27 lines
650 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Diff-Check Tool #
|
|
# Checks if outputed TOK = exp #
|
|
# The Translators - Spring 2025 #
|
|
|
|
TOK_DIR="out"
|
|
|
|
if [[ ! -d "$TOK_DIR" ]]; then
|
|
echo "Directory $TOK_DIR does not exist."
|
|
exit 1
|
|
fi
|
|
|
|
echo -e "\n"
|
|
for file in "$TOK_DIR"/*; do
|
|
filename=$(basename -- "$file")
|
|
filename="${filename%.*}"
|
|
num=${filename:2:1}
|
|
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"
|
|
fi
|
|
done |