libracharlie / java-diff-utils

Automatically exported from code.google.com/p/java-diff-utils
0 stars 0 forks source link

ChangedDelta doesn't create informal output. #5

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create two string list, which has a difference in line content.
2. Run against the DiffUtils.diff function
3. Print out the results as suggested in the examples using:
for(Delta delta : patch.getDeltas()){
 System.out.println(delta); //delta is an instance of Delta
}

What is the expected output? What do you see instead?
Here is the output for one comparison:
difflib.ChangeDelta@311dc402
[DeleteDelta, position: 80, lines: [! U1 X 340]]
[InsertDelta, position: 83, lines: [______________extra_______]]
difflib.ChangeDelta@91d50064

As you can see the two text, has 4 difference. One insert one delete and two 
change. The ChangeDelta.toString() is probably not overridden.

What version of the product are you using? On what operating system?
Probably you are only interested in the version: 1.2

Please provide any additional information below.

Original issue reported on code.google.com by edvi...@gmail.com on 6 Aug 2010 at 1:37

GoogleCodeExporter commented 8 years ago
Thanks for noticing that! Fixed. Example of new output: "[ChangeDelta, 
position: 1, lines: [bbb] to [zzz]]"

Original comment by dm.naume...@gmail.com on 15 Oct 2010 at 12:09