xdiff : remove not needed code
xdiff : update tests to add Exception tests git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@4313 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -290,4 +290,50 @@ to this document.
|
||||
+\n");
|
||||
}
|
||||
|
||||
public function test_diffFile_unified_1 ()
|
||||
{
|
||||
file_put_contents ("/tmp/test_xdiff1", $this->string1);
|
||||
file_put_contents ("/tmp/test_xdiff2", $this->string2);
|
||||
$xdiff = new xdiff ("unified");
|
||||
$res = $xdiff->diffFile ("/tmp/test_xdiff1", "/tmp/test_xdiff2");
|
||||
$this->assertSame ($res, "--- /tmp/test_xdiff1 ".date ("Y-m-d H:i:s.u000 O")."
|
||||
+++ /tmp/test_xdiff2 ".date ("Y-m-d H:i:s.u001 O")."
|
||||
@@ -0,0 +1,6 @@
|
||||
+This is an important
|
||||
+notice! It should
|
||||
+therefore be located at
|
||||
+the beginning of this
|
||||
+document!
|
||||
+
|
||||
@@ -11,5 +16,0 @@
|
||||
-This paragraph contains
|
||||
-text that is outdated.
|
||||
-It will be deleted in the
|
||||
-near future.
|
||||
-
|
||||
@@ -17 +18 @@
|
||||
-check this dokument. On
|
||||
+check this document. On
|
||||
@@ -24,0 +26,4 @@
|
||||
+
|
||||
+This paragraph contains
|
||||
+important new additions
|
||||
+to this document.
|
||||
");
|
||||
|
||||
}
|
||||
|
||||
public function test_diffFile_unified_2 ()
|
||||
{
|
||||
$xdiff = new xdiff ("unified");
|
||||
$this->setExpectedException ();
|
||||
$res = $xdiff->diffFile ("/tmp/test_xdiffNOTEXISTS", "/tmp/test_xdiff2");
|
||||
}
|
||||
|
||||
public function test_diffFile_unified_3 ()
|
||||
{
|
||||
$xdiff = new xdiff ("unified");
|
||||
$this->setExpectedException ();
|
||||
$res = $xdiff->diffFile ("/tmp/test_xdiff1", "/tmp/test_xdiffNOTEXISTS");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user