|
Revision 14126, 0.6 kB
(checked in by tm1000, 1 year ago)
|
Endpoint Manager
-Add pear_diff
|
- Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 |
--TEST-- |
|---|
| 2 |
Text_Diff: Unified renderer 2 |
|---|
| 3 |
--FILE-- |
|---|
| 4 |
<?php |
|---|
| 5 |
include_once 'Text/Diff.php'; |
|---|
| 6 |
include_once 'Text/Diff/Renderer/unified.php'; |
|---|
| 7 |
|
|---|
| 8 |
$lines1 = file(dirname(__FILE__) . '/5.txt'); |
|---|
| 9 |
$lines2 = file(dirname(__FILE__) . '/6.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,5 +1,7 @@ |
|---|
| 18 |
This is a test. |
|---|
| 19 |
Adding random text to simulate files. |
|---|
| 20 |
+Inserting a line. |
|---|
| 21 |
Various Content. |
|---|
| 22 |
-More Content. |
|---|
| 23 |
-Testing diff and renderer. |
|---|
| 24 |
+Replacing content. |
|---|
| 25 |
+Testing similarities and renderer. |
|---|
| 26 |
+Append content. |
|---|