From 0af728ffeeba35cc7b264f3d9b8890469db1e861 Mon Sep 17 00:00:00 2001 From: webzwo0i Date: Sun, 31 Oct 2021 00:24:00 +0200 Subject: [PATCH] textLinesMutator: coverage for changed attributes in multiline keeps --- src/tests/frontend/specs/easysync-mutations.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/tests/frontend/specs/easysync-mutations.js b/src/tests/frontend/specs/easysync-mutations.js index 7cf43c8b7..06aa63dab 100644 --- a/src/tests/frontend/specs/easysync-mutations.js +++ b/src/tests/frontend/specs/easysync-mutations.js @@ -188,6 +188,15 @@ describe('easysync-mutations', function () { testMutateTextLines(1, 'Z:4<1|1-2-1|1+1+1$\nc', ['a\n', 'b\n'], ['\n', 'c\n']); testMutateTextLines(2, 'Z:4>0|1-2-1|2+3$\nc\n', ['a\n', 'b\n'], ['\n', 'c\n', '\n']); + + it('mutate keep only lines', async function () { + const lines = ['1\n', '2\n', '3\n', '4\n']; + const result = lines.slice(); + const cs = 'Z:8>0*0|1=2|2=2'; + + Changeset.mutateTextLines(cs, lines); + expect(result).to.eql(lines); + }); }); describe('mutate attributions', function () {