mirror of
https://github.com/zrax/pycdc.git
synced 2026-06-23 11:34:07 +00:00
Display the diff when a test doesn't match the expected output.
This commit is contained in:
parent
646213ef4f
commit
727da48ba5
1 changed files with 3 additions and 2 deletions
|
|
@ -51,11 +51,12 @@ for pyc in "${compfiles[@]}"; do
|
|||
continue
|
||||
fi
|
||||
|
||||
if ! diff "$base.tok.txt" "$testdir/tokenized/$testname.txt" >/dev/null
|
||||
diff -u "$testdir/tokenized/$testname.txt" "$base.tok.txt" >"$base.tok.diff"
|
||||
if (( $? ))
|
||||
then
|
||||
let fails+=1
|
||||
efiles+=("$(basename "$pyc")")
|
||||
errors+=("$base.tok.txt does not match $testdir/tokenized/$testname.txt")
|
||||
errors+=("$base.tok.txt does not match $testdir/tokenized/$testname.txt:\n$(cat "$base.tok.diff")")
|
||||
continue
|
||||
fi
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue