1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-27 10:32:58 +02:00
joplin/packages/fork-sax/test/cdata-fake-end.js

29 lines
782 B
JavaScript
Raw Normal View History

2020-11-05 18:58:23 +02:00
var p = require(__dirname).test({
expect: [
['opentagstart', {'name': 'R', 'attributes': {}}],
['opentag', {'name': 'R', 'attributes': {}, 'isSelfClosing': false}],
['opencdata', undefined],
['cdata', '[[[[[[[[]]]]]]]]'],
['closecdata', undefined],
['closetag', 'R']
]
})
var x = '<r><![CDATA[[[[[[[[[]]]]]]]]]]></r>'
for (var i = 0; i < x.length; i++) {
p.write(x.charAt(i))
}
p.close()
var p2 = require(__dirname).test({
expect: [
['opentagstart', {'name': 'R', 'attributes': {}}],
['opentag', {'name': 'R', 'attributes': {}, 'isSelfClosing': false}],
['opencdata', undefined],
['cdata', '[[[[[[[[]]]]]]]]'],
['closecdata', undefined],
['closetag', 'R']
]
})
x = '<r><![CDATA[[[[[[[[[]]]]]]]]]]></r>'
p2.write(x).close()