unite
unite copied to clipboard
Diff shows too many differences on long wrapped lines
The following test yields a difference in the end of the binary, even though there is none, because of how line breaks are added to pretty terms before the diff is computed:
unite_bug_test() ->
Bin1 = <<0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0>>,
Bin2 = <<255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0>>,
?assertEqual(Bin1, Bin2).
Output:
1) unite_bug_test/0 (_build/test/lib/unite/test/bug_test.erl:10)
Assert equal failed! -Expected- +Actual+
-<<0-+<<255+,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-0,-
0,0,0,0,0,0,+0,+0>>