wallet-core/node_modules/sax/test/self-closing-child-strict.js
2016-11-03 01:33:53 +01:00

45 lines
763 B
JavaScript

require(__dirname).test({
xml :
"<root>"+
"<child>" +
"<haha />" +
"</child>" +
"<monkey>" +
"=(|)" +
"</monkey>" +
"</root>",
expect : [
["opentag", {
"name": "root",
"attributes": {},
"isSelfClosing": false
}],
["opentag", {
"name": "child",
"attributes": {},
"isSelfClosing": false
}],
["opentag", {
"name": "haha",
"attributes": {},
"isSelfClosing": true
}],
["closetag", "haha"],
["closetag", "child"],
["opentag", {
"name": "monkey",
"attributes": {},
"isSelfClosing": false
}],
["text", "=(|)"],
["closetag", "monkey"],
["closetag", "root"],
["end"],
["ready"]
],
strict : true,
opt : {}
});