1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-12-23 14:00:55 +01:00

Add a test case to make sure prefix/suffix intraline diffs work correctly

Summary: Wanted to double-check that this works properly; it does, but might as well keep the test case.

Test Plan: Ran tests.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, epriestley

Maniphest Tasks: T970

Differential Revision: https://secure.phabricator.com/D1869
This commit is contained in:
epriestley 2012-03-12 18:21:44 -07:00
parent d8b510596f
commit 0dd9f5f3a5

View file

@ -84,6 +84,25 @@ final class ArcanistDiffUtilsTestCase extends ArcanistPhutilTestCase {
'public function and($b, $c) {', 'public function and($b, $c) {',
'siixsdddxsssssssssssiissxsssxsss' 'siixsdddxsssssssssssiissxsssxsss'
), ),
array(
// This is a test that we correctly detect shared prefixes and suffixes
// and don't trigger "give up, too long" mode if there's a small text
// change in an ocean of similar text.
' if ('.
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'.
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'.
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx) {',
' if('.
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'.
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'.
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx) {',
'ssssssssssds'.
'ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss'.
'ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss'.
'sssssssssssssssssssssssssssssssssssssss',
),
); );
foreach ($tests as $test) { foreach ($tests as $test) {