pike.git / lib / modules / Parser.pmod / XML.pmod / testsuite.in

version» Context lines:

pike.git/lib/modules/Parser.pmod/XML.pmod/testsuite.in:27:   test_tree_eq([[ ("<?xml version=\"1.0\"?><!DOCTYPE greeting SYSTEM \"hello.dtd\"><!-- comment -- --><x/>")->render_xml() ]],   [[ "<?xml version='1.0' encoding='utf-8'?><!DOCTYPE greeting SYSTEM \"hello.dtd\"><!-- comment -- --><x/>" ]])      // Check that any xml and/or doctype header survives the parsing.   // Check also that the headers are rendered properly.   test_tree_eq([[ ("<?xml version='1.0' encoding='iso-8859-1'?><!DOCTYPE foo [ <!ELEMENT foo (foo)*> ]><foo><foo/><foo/></foo>")->render_xml() ]],    [[ "<?xml version='1.0' encoding='iso-8859-1'?><!DOCTYPE foo [ <!ELEMENT foo (foo)*> ]><foo><foo/><foo/></foo>" ]])   test_tree_eq([[ ("<?xml version='1.0' encoding='utf-8'?><!DOCTYPE foo PUBLIC \"-//EN\" \"foo.dtd\" ><foo><foo/><foo/></foo>")->render_xml() ]],    [[ "<?xml version='1.0' encoding='utf-8'?><!DOCTYPE foo PUBLIC \"-//EN\" \"foo.dtd\"><foo><foo/><foo/></foo>" ]])    - test_eq([[ Parser.XML.Tree.parse_input("<?xml version='1.0' encoding='iso-8859-1'?><a>\x2122</a>")->render_xml() ]], "<?xml version='1.0' encoding='iso-8859-1'?><a>&#2122;</a>" ) + test_eq([[ Parser.XML.Tree.parse_input("<?xml version='1.0' encoding='iso-8859-1'?><a>\x2122</a>")->render_xml() ]], "<?xml version='1.0' encoding='iso-8859-1'?><a>&#x2122;</a>" )      test_any([[      class A {    inherit Parser.XML.Tree.RootNode;    public array(Parser.XML.Tree.AbstractSimpleNode) mChildren = ({});   };      return sizeof(A("<!-- --><!-- --><x/>")->mChildren);   ]], 3)