From d87cc76a0a10ab488729d77c2c712f18f88eb341 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Wed, 23 Oct 2013 13:54:37 +0200 Subject: [PATCH] smartxml: Integrating old tests from canvas api (keeping entities) --- src/smartxml/smartxml.test.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/smartxml/smartxml.test.js b/src/smartxml/smartxml.test.js index 597c107..86f16de 100644 --- a/src/smartxml/smartxml.test.js +++ b/src/smartxml/smartxml.test.js @@ -176,6 +176,19 @@ describe('smartxml', function() { expect(input.isEqualNode(output)).to.be.true; }); + + it('keeps entities intact', function() { + var xmlIn = '
< >
', + doc = getDocumentFromXML(xmlIn), + xmlOut = doc.toXML(); + expect(xmlOut).to.equal(xmlIn); + }); + it('keeps entities intact when they form html/xml', function() { + var xmlIn = '
<abc>
', + doc = getDocumentFromXML(xmlIn), + xmlOut = doc.toXML(); + expect(xmlOut).to.equal(xmlIn); + }); }); }); -- 2.20.1