b2evolution PHP Cross Reference Blogging Systems

Source: /inc/_ext/phpsvnclient/ext/Diff/tests/unified.phpt - 21 lines - 503 bytes - Text - Print

   1  --TEST--
   2  Text_Diff: Unified renderer
   3  --FILE--
   4  <?php
   5  include_once 'Text/Diff.php';
   6  include_once 'Text/Diff/Renderer/unified.php';
   7  
   8  $lines1 = file(dirname(__FILE__) . '/1.txt');
   9  $lines2 = file(dirname(__FILE__) . '/2.txt');
  10  
  11  $diff = new Text_Diff('native', array($lines1, $lines2));
  12  
  13  $renderer = new Text_Diff_Renderer_unified();
  14  echo $renderer->render($diff);
  15  ?>
  16  --EXPECT--
  17  @@ -1,3 +1,3 @@
  18   This line is the same.
  19  -This line is different in 1.txt
  20  +This line is different in 2.txt
  21   This line is the same.

title

Description

title

Description

title

Description

title

title

Body