roar/asciiblaster-cordoba/platforms/android/cordova/node_modules/sax/test/self-closing-child.js

41 lines
649 B
JavaScript

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