Started ticket 39, add code review.
We now have a limited support of the code review. Still some work to be done to allow the submission of new patches on a given review and update the status. For the moment, only pre-commit review is supported.
This commit is contained in:
@@ -54,4 +54,21 @@ class IDF_Tests_TestDiff extends UnitTestCase
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
public function testBinaryDiff()
|
||||
{
|
||||
$diff_content = file_get_contents(dirname(__FILE__).'/test-diff.diff');
|
||||
$orig = file_get_contents(dirname(__FILE__).'/test-diff-view.html');
|
||||
$diff = new IDF_Diff($diff_content);
|
||||
$diff->parse();
|
||||
$def = $diff->files['src/IDF/templates/idf/issues/view.html'];
|
||||
|
||||
$orig_lines = preg_split("/\015\012|\015|\012/", $orig);
|
||||
$merged = $diff->mergeChunks($orig_lines, $def, 10);
|
||||
$lchunk = end($merged);
|
||||
$lline = end($lchunk);
|
||||
$this->assertEqual(array('', '166', '{/if}{/block}'),
|
||||
$lline);
|
||||
//print_r($diff->mergeChunks($orig_lines, $def, 10));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user