Skip to content

Commit

Permalink
tests: sort input and output files when comparing
Browse files Browse the repository at this point in the history
  • Loading branch information
jarelllama authored Dec 26, 2024
1 parent a5f0a0f commit 9c8ccf8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions scripts/test_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -587,11 +587,6 @@ test_unparked_check() {
# $1: script to execute
# $2: arguments to pass to script
run_script() {
# Format expected output files (ignore not found error)
for file in out_*; do
sort "$file" -o "$file" 2> /dev/null
done

printf "\n\e[1m[start] %s %s\e[0m\n" "$1" "$2"
echo "----------------------------------------------------------------------"

Expand Down Expand Up @@ -673,6 +668,8 @@ check_terms() {
# $2: expected output file
# $3: name of the file being checked
check_output() {
sort "$1" -o "$1"
sort "$2" -o "$2"
cmp -s "$1" "$2" && return # Return if files are the same
printf "\e[1m[warn] %s file is not as expected:\e[0m\n" "$3"
cat "$1"
Expand Down

0 comments on commit 9c8ccf8

Please sign in to comment.