Skip to content

Commit 927a3e7

Browse files
webzwo0irhansen
authored andcommitted
tests: Add regression tests for #2836
They test if it is possible to delete lines from the array that is mutated by a changeset, and after no line is left insert some characters (with or without new lines).
1 parent ccd7a8d commit 927a3e7

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/tests/frontend/specs/easysync.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,17 @@ describe('easysync', function () {
178178
['skip', 1, 1, true],
179179
], ['banana\n', 'cabbage\n', 'duffle\n']);
180180

181+
// #2836 regressions
182+
runMutationTest(8, ['\n'], [
183+
['remove', 1, 1, '\n'],
184+
['insert', 'c', 0],
185+
], ['c']);
186+
runMutationTest(9, ['\n'], [
187+
['remove', 1, 1, '\n'],
188+
['insert', 'a'],
189+
['insert', 'c\n', 1],
190+
], ['ac\n']);
191+
181192
const poolOrArray = (attribs) => {
182193
if (attribs.getAttrib) {
183194
return attribs; // it's already an attrib pool

0 commit comments

Comments
 (0)