UNPKG

648 BJavaScriptView Raw
1
2require(__dirname).test({
3 xml :
4 "<root>"+
5 "<child>" +
6 "<haha />" +
7 "</child>" +
8 "<monkey>" +
9 "=(|)" +
10 "</monkey>" +
11 "</root>",
12 expect : [
13 ["opentag", {
14 "name": "root",
15 "attributes": {}
16 }],
17 ["opentag", {
18 "name": "child",
19 "attributes": {}
20 }],
21 ["opentag", {
22 "name": "haha",
23 "attributes": {}
24 }],
25 ["closetag", "haha"],
26 ["closetag", "child"],
27 ["opentag", {
28 "name": "monkey",
29 "attributes": {}
30 }],
31 ["text", "=(|)"],
32 ["closetag", "monkey"],
33 ["closetag", "root"],
34 ["end"],
35 ["ready"]
36 ],
37 strict : true,
38 opt : {}
39});
40