mirror of
https://github.com/NixOS/nix.git
synced 2024-11-21 14:22:29 +00:00
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:
parent
30bdee5c3b
commit
772897a1cd
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user