intelligen / java-diff-utils

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

Failed to create unified diff for a one-string file #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
see attached files: for these files the following test fails

    public void testDiff_Issue11() throws Exception {
        final List<String> lines1 = fileToLines("test" + FS + "mocks" + FS + "issue11_1.txt");
        final List<String> lines2 = fileToLines("test" + FS + "mocks" + FS + "issue11_2.txt");

        final Patch patch = DiffUtils.diff(lines1, lines2);
        final String fileName = "xxx";
        final List<String> stringList = DiffUtils.generateUnifiedDiff(fileName, fileName, lines1, patch, 3);
        final Patch x = DiffUtils.parseUnifiedDiff(stringList);
        DiffUtils.patch(lines1, x);
    }

Original issue reported on code.google.com by shotwave@gmail.com on 9 Dec 2010 at 5:37

Attachments:

GoogleCodeExporter commented 9 years ago
fixed in r26

Original comment by shotwave@gmail.com on 9 Dec 2010 at 7:11