8

I want to provide a diff report for a non regression test. My program is Java based but I did not found any API filling my needs.

So I'm using an external tool (CSDiff) that take 2 files as arguments and return an HTML report. That's nice and easy to setup.

Now the only problem I have is that the HTML report needs some tweaks to be used and I am messing around with the report, trying to transform it into something different (hidding some parts, changing the style, ...)

Does someone know a diff tools that has a powerful command line support, allowing custom report to be generated ? Nice report options would be 2 panes view, regexp filtering, easy styling options... something like the vim diff view in html would be great.

I've already read stuff about diff tools in stackoverflow but I don't find the stuff I'm looking for.

Many Thanks

Community
  • 1
  • 1
Guillaume
  • 5,488
  • 11
  • 47
  • 83

3 Answers3

5

I would recommend google-diff-match-patch. This provides HTML or the basic diff components which you could style and transform yourself.

Klerisson
  • 312
  • 1
  • 2
  • 17
  • 1
    I've missed this one because of an aggressive proxy at work. I manage to get a copy of the source, and it's great ! Thanks a lot. BTW, your answer need a little edit for formating purpose. – Guillaume Jan 25 '10 at 17:23
1

Pretty Diff provides an HTML report either on screen in a web browser or as HTML formatted text that can be saved as an HTML file.

austincheney
  • 807
  • 10
  • 9
0

I don't know such library from top of my head but if Google search doesn't bring anything relevant back, I would take a look at Eclipse sources. Eclipse has very good text diff tool which you might be able to reuse, unless it's tied up pretty badly to their UI stuff, which I hope is not the case.

maximdim
  • 8,041
  • 3
  • 33
  • 48
  • well, I was expecting a more easier way than a DIY using eclipse or whatever open source project (by the way I like the eclipse diff tool; I also like the one in FishEye.) – Guillaume Jan 25 '10 at 08:39