mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-12-22 21:40:54 +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:
parent
d8b510596f
commit
0dd9f5f3a5
1 changed files with 19 additions and 0 deletions
|
@ -84,6 +84,25 @@ final class ArcanistDiffUtilsTestCase extends ArcanistPhutilTestCase {
|
|||
'public function and($b, $c) {',
|
||||
'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) {
|
||||
|
|
Loading…
Reference in a new issue