b2evolution PHP Cross Reference Blogging Systems

Source: /inc/_ext/phpsvnclient/ext/Diff/tests/context.phpt - 25 lines - 583 bytes - Text - Print

   1  --TEST--
   2  Text_Diff: Context renderer
   3  --FILE--
   4  <?php
   5  include_once 'Text/Diff.php';
   6  include_once 'Text/Diff/Renderer/context.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_context();
  14  echo $renderer->render($diff);
  15  ?>
  16  --EXPECT--
  17  ***************
  18  *** 1,3 ****
  19    This line is the same.
  20  ! This line is different in 1.txt
  21    This line is the same.
  22  --- 1,3 ----
  23    This line is the same.
  24  ! This line is different in 2.txt
  25    This line is the same.

title

Description

title

Description

title

Description

title

title

Body