mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-23 00:46:16 -04:00
Changeset: Fix off-by-one bug in makeSplice
This commit is contained in:
parent
30d68df396
commit
748d661495
2 changed files with 8 additions and 1 deletions
|
@ -70,6 +70,13 @@ describe('easysync-other', function () {
|
|||
expect(t2).to.equal('a\nb\ncdef\n');
|
||||
});
|
||||
|
||||
it('makeSplice at the end', async function () {
|
||||
const orig = '123';
|
||||
const ins = '456';
|
||||
expect(Changeset.applyToText(Changeset.makeSplice(orig, orig.length, 0, ins), orig))
|
||||
.to.equal(`${orig}${ins}`);
|
||||
});
|
||||
|
||||
it('testToSplices', async function () {
|
||||
const cs = Changeset.checkRep('Z:z>9*0=1=4-3+9=1|1-4-4+1*0+a$123456789abcdefghijk');
|
||||
const correctSplices = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue