Hide Forgot
Hi, In case that files are differ output of rlAssertNotDiffer seems like: :: [ FAIL ] :: Files reproducer.expected and output should not differ which says nothing and it then is really hard to debug what is wrong. So now I temporary use following code in the test which print diff output if files are differ or nothing if files are same: rlAssertNotDiffer expected.txt output.txt || rlLogWarning "$(diff -u expected.txt output.txt)" it would be nice add this verbose output to rlAssertNotDiffer function. Thanks, DJ
The files can also be kind of binary so the diff should not be printed by default. I propose adding an option which would cause the output to be printed.
I can not see any problem with binaries, AFAIK diff -u never print any binary output, see e.g.: $ diff -u David.jpg Image.ashx.jpg Binary files David.jpg and Image.ashx.jpg differ $ But in some case output could be really long... So add an option like -v for '... diff | head -200 ' and -vv for diff without head or something like that would be OK.
(In reply to David Jež from comment #2) > But in some case output could be really long... So add an option like -v for > '... diff | head -200 ' and -vv for diff without head or something like that > would be OK. This sound reasonable to me. Lets wait for others to express their acks.
Personally I've always considered rlAssert*Diff to be useless, not having any advantage over rlRun "diff ...". So adding few more useful features to it would, in my eyes, at least make it worth keeping around.
I deem the feature quite useful -> ack+