Skip to content

Commit

Permalink
Color diff output in tests/functional/lang tests
Browse files Browse the repository at this point in the history
Use `diff --color=always` to print colored output for language test
failures. I've also flipped the arguments so that expected lines missing
from the actual output will be marked with a red `-` and additional
lines found in the actual output will be marked with a green `+`.
Previously it was the other way around, which was very confusing.
  • Loading branch information
9999years committed Jan 26, 2024
1 parent 30bdee5 commit 772897a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/functional/lang/framework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function diffAndAcceptInner() {
fi

# Diff so we get a nice message
if ! diff --unified "$got" "$expectedOrEmpty"; then
if ! diff --color=always --unified "$expectedOrEmpty" "$got"; then
echo "FAIL: evaluation result of $testName not as expected"
badDiff=1
fi
Expand Down

0 comments on commit 772897a

Please sign in to comment.