@@ -315,4 +315,55 @@ public void testGeneratorIssue15() throws DiffException, IOException {
315
315
}
316
316
}
317
317
}
318
+
319
+ @ Test
320
+ public void testGeneratorIssue22 () throws DiffException {
321
+ DiffRowGenerator generator = DiffRowGenerator .create ()
322
+ .showInlineDiffs (true )
323
+ .inlineDiffByWord (true )
324
+ .oldTag (f -> "~" )
325
+ .newTag (f -> "**" )
326
+ .build ();
327
+ String aa = "This is a test senctence." ;
328
+ String bb = "This is a test for diffutils.\n This is the second line." ;
329
+ List <DiffRow > rows = generator .generateDiffRows (
330
+ Arrays .asList (aa .split ("\n " )),
331
+ Arrays .asList (bb .split ("\n " )));
332
+
333
+ System .out .println (rows );
334
+ }
335
+
336
+ @ Test
337
+ public void testGeneratorIssue22_2 () throws DiffException {
338
+ DiffRowGenerator generator = DiffRowGenerator .create ()
339
+ .showInlineDiffs (true )
340
+ .inlineDiffByWord (true )
341
+ .oldTag (f -> "~" )
342
+ .newTag (f -> "**" )
343
+ .build ();
344
+ String aa = "This is a test for diffutils.\n This is the second line." ;
345
+ String bb = "This is a test senctence." ;
346
+ List <DiffRow > rows = generator .generateDiffRows (
347
+ Arrays .asList (aa .split ("\n " )),
348
+ Arrays .asList (bb .split ("\n " )));
349
+
350
+ System .out .println (rows );
351
+ }
352
+
353
+ @ Test
354
+ public void testGeneratorIssue22_3 () throws DiffException {
355
+ DiffRowGenerator generator = DiffRowGenerator .create ()
356
+ .showInlineDiffs (true )
357
+ .inlineDiffByWord (true )
358
+ .oldTag (f -> "~" )
359
+ .newTag (f -> "**" )
360
+ .build ();
361
+ String aa = "This is a test senctence." ;
362
+ String bb = "This is a test for diffutils.\n This is the second line.\n And one more." ;
363
+ List <DiffRow > rows = generator .generateDiffRows (
364
+ Arrays .asList (aa .split ("\n " )),
365
+ Arrays .asList (bb .split ("\n " )));
366
+
367
+ System .out .println (rows );
368
+ }
318
369
}
0 commit comments