xdiff : side by side support with screen width parameter

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@5062 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2019-03-01 13:30:20 +00:00
parent 38b8b4f5a6
commit ae306d19ba
2 changed files with 158 additions and 1 deletions

View File

@@ -8,7 +8,6 @@
class test_xdiff extends PHPUnit_Framework_TestCase
{
// Declaration of $string1 and $string2
// Taken from
// {{{
private $string1 = "This part of the
document has stayed the
@@ -336,4 +335,48 @@ to this document.
$this->setExpectedException ();
$res = $xdiff->diffFile ("/tmp/test_xdiff1", "/tmp/test_xdiffNOTEXISTS");
}
public function test_diffFile_sideBySide_1 ()
{
file_put_contents ("/tmp/test_xdiff1", $this->string1);
file_put_contents ("/tmp/test_xdiff2", $this->string2);
$xdiff = new xdiff ("sideBySide");
$res = $xdiff->diffFile ("/tmp/test_xdiff1", "/tmp/test_xdiff2");
$this->assertSame ($res,
" > This is an important
> notice! It should
> therefore be located at
> the beginning of this
> document!
>
This part of the This part of the
document has stayed the document has stayed the
same from version to same from version to
version. It shouldn't version. It shouldn't
be shown if it doesn't be shown if it doesn't
change. Otherwise, that change. Otherwise, that
would not be helping to would not be helping to
compress the size of the compress the size of the
changes. changes.
This paragraph contains <
text that is outdated. <
It will be deleted in the <
near future. <
<
It is important to spell It is important to spell
check this dokument. On | check this document. On
the other hand, a the other hand, a
misspelled word isn't misspelled word isn't
the end of the world. the end of the world.
Nothing in the rest of Nothing in the rest of
this paragraph needs to this paragraph needs to
be changed. Things can be changed. Things can
be added after it. be added after it.
>
> This paragraph contains
> important new additions
> to this document.
");
}
}