Skip to content

Commit 0b382a7

Browse files
committed
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 855bd27 commit 0b382a7

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/node/easysync_tests.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,17 @@ function runTests() {
222222
['skip', 1, 1, true]
223223
], ["banana\n", "cabbage\n", "duffle\n"]);
224224

225+
// #2836 regressions
226+
runMutationTest(8, ["\n"], [
227+
['remove', 1, 1, "\n"],
228+
['insert',"c", 0]
229+
], ["c"]);
230+
runMutationTest(9, ["\n"], [
231+
['remove', 1, 1, "\n"],
232+
['insert', "a"],
233+
['insert',"c\n", 1]
234+
], ["ac\n"]);
235+
225236
function poolOrArray(attribs) {
226237
if (attribs.getAttrib) {
227238
return attribs; // it's already an attrib pool

0 commit comments

Comments
 (0)