Skip to content

Commit badbe9a

Browse files
webzwo0irhansen
authored andcommitted
textLinesMutator: coverage for changed attributes in multiline keeps
1 parent 25043cf commit badbe9a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,15 @@ describe('easysync-mutations', 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+
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+
});
191200
});
192201

193202
describe('mutate attributions', function () {

0 commit comments

Comments
 (0)