Color diff output in tests/functional/lang tests

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.
This commit is contained in:
Rebecca Turner 2024-01-26 10:08:56 -08:00
parent 30bdee5c3b
commit 772897a1cd
No known key found for this signature in database

View File

@ -16,7 +16,7 @@ function diffAndAcceptInner() {
fi fi
# Diff so we get a nice message # 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" echo "FAIL: evaluation result of $testName not as expected"
badDiff=1 badDiff=1
fi fi