On Sunday, February 9, 2003, at 10:45 AM, Philip Martin wrote:
> Garrett Rooney <rooneg@electricjellyfish.net> writes:
>
>> at least the first 'failure' in there seems to
>> produce a valid unified diff, it's just showing slightly more context
>> than you're expecting.
>
> Which probably indicates a bug :) What happens when we extend the
> library to support a varying number of context lines? I believe the
> current output is wrong.
>
> Lets see
>
> $ patch --dry-run foo15a < diff-foo15a-bar15a
> patching file foo15a
> Hunk #1 succeeded at 1 with fuzz 1.
>
> See that fuzz message? Even patch thinks it's suspect.
>
>> perhaps these tests shouldn't be comparing against a cannonical 'good
>> result', but instead should be using patch to try to reconstruct the
>> original file from the diff, and verifying that it matches.
>
> I disagree. A "diff" that simply deleted one file and added the
> second would do that, but it's not very useful. These tests are
> designed to prohibit that. Obviously in some cases the diff algorithm
> has to make arbitrary choices, but in the the cases I have tested
> explicitly I believe the diff output should be predictable. Any
> variation it is most likely a bug.
ok, you convinced me ;-)
as for the other parts of the tests (the ones that dump core), here's a
patch that 'fixes' it, although i'm nowhere near convinced it is
correct, as i'm not sure how the diff/diff3 code works, so sander will
have to look over them first.
-garrett
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Feb 9 18:23:22 2003