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:
Loic d'Anterroches
2008-11-30 10:26:05 +01:00
parent fbe364462d
commit f690968b11
35 changed files with 2422 additions and 8 deletions

View File

@@ -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));
}
}