X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/cf7c3b4fb3a419476a0d7f6118d3ba9a3fd0c809..42137454f5546e6346ff24374cba0394174321d2:/modules/documentCanvas/canvas/canvas.test3.js
diff --git a/modules/documentCanvas/canvas/canvas.test3.js b/modules/documentCanvas/canvas/canvas.test3.js
index 51f4f0a..50f03e9 100644
--- a/modules/documentCanvas/canvas/canvas.test3.js
+++ b/modules/documentCanvas/canvas/canvas.test3.js
@@ -1185,7 +1185,31 @@ describe('Canvas', function() {
var xmlOut = c.toXML();
console.log(xmlOut);
expect(xmlOut).to.equal(xmlIn);
+ });
+
+ it('keeps white space around text node', function() {
+ var xmlIn = '\
+ \
+ Some text surrounded by white space\
+ \
+ ',
+ c = canvas.fromXML(xmlIn);
+ var xmlOut = c.toXML();
+ expect(xmlOut).to.equal(xmlIn);
+ });
+
+ it('keeps white space around text node - last node case', function() {
+ var xmlIn = '\
+ \
+ \
+ Some text surrounded by white space\
+ \
+ ',
+ c = canvas.fromXML(xmlIn);
+
+ var xmlOut = c.toXML();
+ expect(xmlOut).to.equal(xmlIn);
});
})