From 66582b19e7a196b77df1e9a912db020189a93014 Mon Sep 17 00:00:00 2001 From: webzwo0i Date: Sun, 15 Feb 2015 16:21:07 +0100 Subject: [PATCH] 51c14d994756e60333b0b60eccb7255cf0c86461 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 --- src/node/easysync_tests.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/node/easysync_tests.js b/src/node/easysync_tests.js index 374e949fd..93e661b0e 100644 --- a/src/node/easysync_tests.js +++ b/src/node/easysync_tests.js @@ -149,7 +149,7 @@ function runTests() { var correctText = correct.join(''); //print(literal(cs)); - var outText = Changeset.applyToText(cs, inText); + var outText = Changeset.applyToText(cs, inText)[0]; assertEqualStrings(correctText, outText); } @@ -585,9 +585,9 @@ function runTests() { var change123a = Changeset.checkRep(Changeset.compose(change1, change23, p)); assertEqualStrings(change123, change123a); - assertEqualStrings(text2, Changeset.applyToText(change12, startText)); - assertEqualStrings(text3, Changeset.applyToText(change23, text1)); - assertEqualStrings(text3, Changeset.applyToText(change123, startText)); + assertEqualStrings(text2, Changeset.applyToText(change12, startText)[0]); + assertEqualStrings(text3, Changeset.applyToText(change23, text1)[0]); + assertEqualStrings(text3, Changeset.applyToText(change123, startText)[0]); } for (var i = 0; i < 30; i++) testCompose(i); @@ -699,7 +699,7 @@ function runTests() { print("> testMakeSplice"); 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); })();