Skip to content

Commit cde0fef

Browse files
committed
textLinesMutator: coverage for changed attributes in multiline keeps
1 parent 61652aa commit cde0fef

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/tests/frontend/specs/easysync-mutations.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,16 @@ describe('easysync', function () {
188188

189189
testMutateTextLines(1, 'Z:4<1|1-2-1|1+1+1$\nc', ['a\n', 'b\n'], ['\n', 'c\n']);
190190
testMutateTextLines(2, 'Z:4>0|1-2-1|2+3$\nc\n', ['a\n', 'b\n'], ['\n', 'c\n', '\n']);
191-
});
192191

192+
it('mutate keep only lines', async function () {
193+
const lines = ['1\n', '2\n', '3\n', '4\n'];
194+
const result = lines.slice();
195+
const cs = 'Z:8>0*0|1=2|2=2';
196+
197+
Changeset.mutateTextLines(cs, lines);
198+
expect(result).to.eql(lines);
199+
});
200+
});
193201

194202
describe('mutate attributions', function () {
195203
const testPoolWithChars = (() => {

0 commit comments

Comments
 (0)