Lines Matching defs:patches
710 List<Patch> patches;
711 patches = dmp.patch_fromText(strp);
712 assertEquals("patch_toText: Single", strp, dmp.patch_toText(patches));
715 patches = dmp.patch_fromText(strp);
716 assertEquals("patch_toText: Dual", strp, dmp.patch_toText(patches));
741 LinkedList<Patch> patches;
746 patches = dmp.patch_make(text2, text1);
747 assertEquals("patch_make: Text2+Text1 inputs", expectedPatch, dmp.patch_toText(patches));
750 patches = dmp.patch_make(text1, text2);
751 assertEquals("patch_make: Text1+Text2 inputs", expectedPatch, dmp.patch_toText(patches));
754 patches = dmp.patch_make(diffs);
755 assertEquals("patch_make: Diff input", expectedPatch, dmp.patch_toText(patches));
757 patches = dmp.patch_make(text1, diffs);
758 assertEquals("patch_make: Text1+Diff inputs", expectedPatch, dmp.patch_toText(patches));
760 patches = dmp.patch_make(text1, text2, diffs);
761 assertEquals("patch_make: Text1+Text2+Diff inputs (deprecated)", expectedPatch, dmp.patch_toText(patches));
763 patches = dmp.patch_make("`1234567890-=[]\\;',./", "~!@#$%^&*()_+{}|:\"<>?");
764 assertEquals("patch_toText: Character encoding.", "@@ -1,21 +1,21 @@\n-%601234567890-=%5B%5D%5C;',./\n+~!@#$%25%5E&*()_+%7B%7D%7C:%22%3C%3E?\n", dmp.patch_toText(patches));
775 patches = dmp.patch_make(text1, text2);
776 assertEquals("patch_make: Long string with repeats.", expectedPatch, dmp.patch_toText(patches));
789 LinkedList<Patch> patches;
790 patches = dmp.patch_make("abcdefghijklmnopqrstuvwxyz01234567890", "XabXcdXefXghXijXklXmnXopXqrXstXuvXwxXyzX01X23X45X67X89X0");
791 dmp.patch_splitMax(patches);
792 assertEquals("patch_splitMax: #1.", "@@ -1,32 +1,46 @@\n+X\n ab\n+X\n cd\n+X\n ef\n+X\n gh\n+X\n ij\n+X\n kl\n+X\n mn\n+X\n op\n+X\n qr\n+X\n st\n+X\n uv\n+X\n wx\n+X\n yz\n+X\n 012345\n@@ -25,13 +39,18 @@\n zX01\n+X\n 23\n+X\n 45\n+X\n 67\n+X\n 89\n+X\n 0\n", dmp.patch_toText(patches));
794 patches = dmp.patch_make("abcdef1234567890123456789012345678901234567890123456789012345678901234567890uvwxyz", "abcdefuvwxyz");
795 String oldToText = dmp.patch_toText(patches);
796 dmp.patch_splitMax(patches);
797 assertEquals("patch_splitMax: #2.", oldToText, dmp.patch_toText(patches));
799 patches = dmp.patch_make("1234567890123456789012345678901234567890123456789012345678901234567890", "abc");
800 dmp.patch_splitMax(patches);
801 assertEquals("patch_splitMax: #3.", "@@ -1,32 +1,4 @@\n-1234567890123456789012345678\n 9012\n@@ -29,32 +1,4 @@\n-9012345678901234567890123456\n 7890\n@@ -57,14 +1,3 @@\n-78901234567890\n+abc\n", dmp.patch_toText(patches));
803 patches = dmp.patch_make("abcdefghij , h : 0 , t : 1 abcdefghij , h : 0 , t : 1 abcdefghij , h : 0 , t : 1", "abcdefghij , h : 1 , t : 1 abcdefghij , h : 1 , t : 1 abcdefghij , h : 0 , t : 1");
804 dmp.patch_splitMax(patches);
805 assertEquals("patch_splitMax: #4.", "@@ -2,32 +2,32 @@\n bcdefghij , h : \n-0\n+1\n , t : 1 abcdef\n@@ -29,32 +29,32 @@\n bcdefghij , h : \n-0\n+1\n , t : 1 abcdef\n", dmp.patch_toText(patches));
809 LinkedList<Patch> patches;
810 patches = dmp.patch_make("", "test");
811 assertEquals("patch_addPadding: Both edges full.", "@@ -0,0 +1,4 @@\n+test\n", dmp.patch_toText(patches));
812 dmp.patch_addPadding(patches);
813 assertEquals("patch_addPadding: Both edges full.", "@@ -1,8 +1,12 @@\n %01%02%03%04\n+test\n %01%02%03%04\n", dmp.patch_toText(patches));
815 patches = dmp.patch_make("XY", "XtestY");
816 assertEquals("patch_addPadding: Both edges partial.", "@@ -1,2 +1,6 @@\n X\n+test\n Y\n", dmp.patch_toText(patches));
817 dmp.patch_addPadding(patches);
818 assertEquals("patch_addPadding: Both edges partial.", "@@ -2,8 +2,12 @@\n %02%03%04X\n+test\n Y%01%02%03\n", dmp.patch_toText(patches));
820 patches = dmp.patch_make("XXXXYYYY", "XXXXtestYYYY");
821 assertEquals("patch_addPadding: Both edges none.", "@@ -1,8 +1,12 @@\n XXXX\n+test\n YYYY\n", dmp.patch_toText(patches));
822 dmp.patch_addPadding(patches);
823 assertEquals("patch_addPadding: Both edges none.", "@@ -5,8 +5,12 @@\n XXXX\n+test\n YYYY\n", dmp.patch_toText(patches));
830 LinkedList<Patch> patches;
831 patches = dmp.patch_make("The quick brown fox jumps over the lazy dog.", "That quick brown fox jumped over a lazy dog.");
832 Object[] results = dmp.patch_apply(patches, "The quick brown fox jumps over the lazy dog.");
837 results = dmp.patch_apply(patches, "The quick red rabbit jumps over the tired tiger.");
842 results = dmp.patch_apply(patches, "I am the very model of a modern major general.");
847 patches = dmp.patch_make("x1234567890123456789012345678901234567890123456789012345678901234567890y", "xabcy");
848 results = dmp.patch_apply(patches, "x123456789012345678901234567890-----++++++++++-----123456789012345678901234567890y");
853 patches = dmp.patch_make("x1234567890123456789012345678901234567890123456789012345678901234567890y", "xabcy");
854 results = dmp.patch_apply(patches, "x12345678901234567890---------------++++++++++---------------12345678901234567890y");
860 patches = dmp.patch_make("x1234567890123456789012345678901234567890123456789012345678901234567890y", "xabcy");
861 results = dmp.patch_apply(patches, "x12345678901234567890---------------++++++++++---------------12345678901234567890y");
870 patches = dmp.patch_make("abcdefghijklmnopqrstuvwxyz--------------------1234567890", "abcXXXXXXXXXXdefghijklmnopqrstuvwxyz--------------------1234567YYYYYYYYYY890");
871 results = dmp.patch_apply(patches, "ABCDEFGHIJKLMNOPQRSTUVWXYZ--------------------1234567890");
878 patches = dmp.patch_make("", "test");
879 String patchStr = dmp.patch_toText(patches);
880 dmp.patch_apply(patches, "");
881 assertEquals("patch_apply: No side effects.", patchStr, dmp.patch_toText(patches));
883 patches = dmp.patch_make("The quick brown fox jumps over the lazy dog.", "Woof");
884 patchStr = dmp.patch_toText(patches);
885 dmp.patch_apply(patches, "The quick brown fox jumps over the lazy dog.");
886 assertEquals("patch_apply: No side effects with major delete.", patchStr, dmp.patch_toText(patches));
888 patches = dmp.patch_make("", "test");
889 results = dmp.patch_apply(patches, "");
894 patches = dmp.patch_make("XY", "XtestY");
895 results = dmp.patch_apply(patches, "XY");
900 patches = dmp.patch_make("y", "y123");
901 results = dmp.patch_apply(patches, "x");