mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
51c14d9947
changed the return value of
applyToText to an array that includes if there was an error in the newline part of an changeset op. easysync_tests need to know this too
This commit is contained in:
parent
440f74b2c1
commit
66582b19e7
1 changed files with 5 additions and 5 deletions
|
@ -149,7 +149,7 @@ function runTests() {
|
||||||
|
|
||||||
var correctText = correct.join('');
|
var correctText = correct.join('');
|
||||||
//print(literal(cs));
|
//print(literal(cs));
|
||||||
var outText = Changeset.applyToText(cs, inText);
|
var outText = Changeset.applyToText(cs, inText)[0];
|
||||||
assertEqualStrings(correctText, outText);
|
assertEqualStrings(correctText, outText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -585,9 +585,9 @@ function runTests() {
|
||||||
var change123a = Changeset.checkRep(Changeset.compose(change1, change23, p));
|
var change123a = Changeset.checkRep(Changeset.compose(change1, change23, p));
|
||||||
assertEqualStrings(change123, change123a);
|
assertEqualStrings(change123, change123a);
|
||||||
|
|
||||||
assertEqualStrings(text2, Changeset.applyToText(change12, startText));
|
assertEqualStrings(text2, Changeset.applyToText(change12, startText)[0]);
|
||||||
assertEqualStrings(text3, Changeset.applyToText(change23, text1));
|
assertEqualStrings(text3, Changeset.applyToText(change23, text1)[0]);
|
||||||
assertEqualStrings(text3, Changeset.applyToText(change123, startText));
|
assertEqualStrings(text3, Changeset.applyToText(change123, startText)[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var i = 0; i < 30; i++) testCompose(i);
|
for (var i = 0; i < 30; i++) testCompose(i);
|
||||||
|
@ -699,7 +699,7 @@ function runTests() {
|
||||||
print("> testMakeSplice");
|
print("> testMakeSplice");
|
||||||
|
|
||||||
var t = "a\nb\nc\n";
|
var t = "a\nb\nc\n";
|
||||||
var t2 = Changeset.applyToText(Changeset.makeSplice(t, 5, 0, "def"), t);
|
var t2 = Changeset.applyToText(Changeset.makeSplice(t, 5, 0, "def"), t)[0];
|
||||||
assertEqualStrings("a\nb\ncdef\n", t2);
|
assertEqualStrings("a\nb\ncdef\n", t2);
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|
Loading…
Reference in a new issue