tests: Add a test
This commit is contained in:
parent
a7716bb744
commit
0a6a95e6f1
|
@ -0,0 +1,48 @@
|
|||
package {
|
||||
import flash.display.MovieClip;
|
||||
|
||||
public class Test extends MovieClip {
|
||||
|
||||
public function Test() {
|
||||
XML.prettyPrinting = false;
|
||||
var tests = [
|
||||
"<![CDATA[abcd]]>text",
|
||||
"<!-- comment --><elem><?pi PI?><!-- inner --> innerText </elem><?pi PI?><![CDATA[ ]]>",
|
||||
" <![CDATA[abcd]]><body/>",
|
||||
"<body/><?pi PI?><body2/><!-- comment -->",
|
||||
"<elem><?pi innerPI?></elem><?pi PI?>",
|
||||
" <body/> ",
|
||||
"<?pi PI?><!-- comment -->"
|
||||
];
|
||||
var settingss = [
|
||||
[false, false, false],
|
||||
[false, false, true],
|
||||
[false, true, false],
|
||||
[false, true, true],
|
||||
[true, false, false],
|
||||
[true, false, true],
|
||||
[true, true, false],
|
||||
[true, true, true]
|
||||
];
|
||||
for(var i in tests) {
|
||||
var test = tests[i];
|
||||
for(var j in settingss) {
|
||||
var settings = settingss[j];
|
||||
XML.ignoreComments = settings[0];
|
||||
XML.ignoreProcessingInstructions = settings[1];
|
||||
XML.ignoreWhitespace = settings[2];
|
||||
try
|
||||
{
|
||||
var x:XML = new XML(test);
|
||||
trace(x.toXMLString());
|
||||
}
|
||||
catch(e:Error)
|
||||
{
|
||||
trace("err: " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
err: TypeError: Error #1088: The markup in the document following the root element must be well-formed.
|
||||
err: TypeError: Error #1088: The markup in the document following the root element must be well-formed.
|
||||
err: TypeError: Error #1088: The markup in the document following the root element must be well-formed.
|
||||
err: TypeError: Error #1088: The markup in the document following the root element must be well-formed.
|
||||
err: TypeError: Error #1088: The markup in the document following the root element must be well-formed.
|
||||
err: TypeError: Error #1088: The markup in the document following the root element must be well-formed.
|
||||
err: TypeError: Error #1088: The markup in the document following the root element must be well-formed.
|
||||
err: TypeError: Error #1088: The markup in the document following the root element must be well-formed.
|
||||
<elem><?pi PI?><!-- inner --> innerText </elem>
|
||||
<elem><?pi PI?><!-- inner -->innerText</elem>
|
||||
<elem><!-- inner --> innerText </elem>
|
||||
<elem><!-- inner -->innerText</elem>
|
||||
<elem><?pi PI?> innerText </elem>
|
||||
<elem><?pi PI?>innerText</elem>
|
||||
<elem> innerText </elem>
|
||||
<elem>innerText</elem>
|
||||
<body/>
|
||||
<body/>
|
||||
<body/>
|
||||
<body/>
|
||||
<body/>
|
||||
<body/>
|
||||
<body/>
|
||||
<body/>
|
||||
err: TypeError: Error #1088: The markup in the document following the root element must be well-formed.
|
||||
err: TypeError: Error #1088: The markup in the document following the root element must be well-formed.
|
||||
err: TypeError: Error #1088: The markup in the document following the root element must be well-formed.
|
||||
err: TypeError: Error #1088: The markup in the document following the root element must be well-formed.
|
||||
err: TypeError: Error #1088: The markup in the document following the root element must be well-formed.
|
||||
err: TypeError: Error #1088: The markup in the document following the root element must be well-formed.
|
||||
err: TypeError: Error #1088: The markup in the document following the root element must be well-formed.
|
||||
err: TypeError: Error #1088: The markup in the document following the root element must be well-formed.
|
||||
<elem><?pi innerPI?></elem>
|
||||
<elem><?pi innerPI?></elem>
|
||||
<elem/>
|
||||
<elem/>
|
||||
<elem><?pi innerPI?></elem>
|
||||
<elem><?pi innerPI?></elem>
|
||||
<elem/>
|
||||
<elem/>
|
||||
<body/>
|
||||
<body/>
|
||||
<body/>
|
||||
<body/>
|
||||
<body/>
|
||||
<body/>
|
||||
<body/>
|
||||
<body/>
|
||||
err: TypeError: Error #1088: The markup in the document following the root element must be well-formed.
|
||||
err: TypeError: Error #1088: The markup in the document following the root element must be well-formed.
|
||||
<!-- comment -->
|
||||
<!-- comment -->
|
||||
<?pi PI?>
|
||||
<?pi PI?>
|
||||
|
||||
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
num_frames = 1
|
Loading…
Reference in New Issue