Copy due_to_rebase to subgroups in gr-diff-processor
We need to preserve the "due_to_rebase" sections to correctly process the subgroups. Change-Id: I3d5f8fbd70d50a92e305960cbcecf0d811b4c980
This commit is contained in:
@@ -510,6 +510,9 @@
|
||||
.map(subgroupLines => {
|
||||
const subGroup = {};
|
||||
subGroup[key] = subgroupLines;
|
||||
if (group.due_to_rebase) {
|
||||
subGroup.due_to_rebase = true;
|
||||
}
|
||||
return subGroup;
|
||||
});
|
||||
},
|
||||
|
@@ -601,6 +601,16 @@ limitations under the License.
|
||||
assert.isTrue(element._breakdown.called);
|
||||
});
|
||||
|
||||
test('_breakdownGroup keeps due_to_rebase for broken down additions',
|
||||
() => {
|
||||
sandbox.spy(element, '_breakdown');
|
||||
const chunk = {b: ['blah', 'blah', 'blah'], due_to_rebase: true};
|
||||
const result = element._breakdownGroup(chunk);
|
||||
for (const subResult of result) {
|
||||
assert.isTrue(subResult.due_to_rebase);
|
||||
}
|
||||
});
|
||||
|
||||
test('_breakdown common case', () => {
|
||||
const array = 'Lorem ipsum dolor sit amet, suspendisse inceptos'
|
||||
.split(' ');
|
||||
|
Reference in New Issue
Block a user