1 |
|
2 | require(__dirname).test
|
3 | ( { xml : "<xml><script>hello world</script></xml>"
|
4 | , expect :
|
5 | [ [ "opentag", { name: "xml", attributes: {} } ]
|
6 | , [ "opentag", { name: "script", attributes: {} } ]
|
7 | , [ "text", "hello world" ]
|
8 | , [ "closetag", "script" ]
|
9 | , [ "closetag", "xml" ]
|
10 | ]
|
11 | , strict : false
|
12 | , opt : { lowercasetags: true, noscript: true }
|
13 | }
|
14 | )
|
15 |
|
16 | require(__dirname).test
|
17 | ( { xml : "<xml><script><![CDATA[hello world]]></script></xml>"
|
18 | , expect :
|
19 | [ [ "opentag", { name: "xml", attributes: {} } ]
|
20 | , [ "opentag", { name: "script", attributes: {} } ]
|
21 | , [ "opencdata", undefined ]
|
22 | , [ "cdata", "hello world" ]
|
23 | , [ "closecdata", undefined ]
|
24 | , [ "closetag", "script" ]
|
25 | , [ "closetag", "xml" ]
|
26 | ]
|
27 | , strict : false
|
28 | , opt : { lowercasetags: true, noscript: true }
|
29 | }
|
30 | )
|
31 |
|