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

version» Context lines:

pike.git/lib/modules/Parser.pmod/XML.pmod/testsuite.in:105:    </div>    </content>    </entry>   </feed>");   ]])      test_eq([[Parser.XML.Tree.simple_parse_input(xmlblob)->render_xml()]], xmlblob)   test_eq([[Parser.XML.Tree.simple_parse_input(xmlblob, UNDEFINED,    Parser.XML.Tree.PARSE_ENABLE_NAMESPACES)->render_xml()]], xmlblob)    + // Test of implicit xml: namespace. + test_do([[add_constant("xmlblob", "<?xml version='1.0' encoding='utf-8'?><foo xml:lang='bar' xmlns='gazonk:'/>");]]) + test_eq([[Parser.XML.Tree.simple_parse_input(xmlblob, UNDEFINED, +  Parser.XML.Tree.PARSE_ENABLE_NAMESPACES)->render_xml()]], xmlblob) +  + // Test of explicit xml: namespace. + test_do([[add_constant("xmlblob", "<?xml version='1.0' encoding='utf-8'?><foo xml:lang='bar' xmlns='gazonk:' xmlns:xml='http://www.w3.org/XML/1998/namespace'/>");]]) + test_eq([[Parser.XML.Tree.simple_parse_input(xmlblob, UNDEFINED, +  Parser.XML.Tree.PARSE_ENABLE_NAMESPACES)->render_xml()]], xmlblob) +  + // Test detection of invalid namespaces. + test_do([[add_constant("xmlblob", "<?xml version='1.0' encoding='utf-8'?><foo xml:lang='bar' xmlns='gazonk:' xmlns:xml='http://www.w3.org/XML/1998/invalid'/>");]]) + test_eval_error([[Parser.XML.Tree.simple_parse_input(xmlblob, UNDEFINED, +  Parser.XML.Tree.PARSE_ENABLE_NAMESPACES);]]) + test_do([[add_constant("xmlblob", "<?xml version='1.0' encoding='utf-8'?><foo xml:lang='bar' xmlns='gazonk:' xmlns:invalid='http://www.w3.org/XML/1998/namespace'/>");]]) + test_eval_error([[Parser.XML.Tree.simple_parse_input(xmlblob, UNDEFINED, +  Parser.XML.Tree.PARSE_ENABLE_NAMESPACES);]]) + test_do([[add_constant("xmlblob", "<?xml version='1.0' encoding='utf-8'?><foo xml:lang='bar' xmlns='gazonk:' xmlns:xmlns='http://www.w3.org/2000/xmlns/'/>");]]) + test_eval_error([[Parser.XML.Tree.simple_parse_input(xmlblob, UNDEFINED, +  Parser.XML.Tree.PARSE_ENABLE_NAMESPACES);]]) + test_do([[add_constant("xmlblob", "<?xml version='1.0' encoding='utf-8'?><foo xml:lang='bar' xmlns='gazonk:' xmlns:xmlns='http://www.w3.org/2000/invalid/'/>");]]) + test_eval_error([[Parser.XML.Tree.simple_parse_input(xmlblob, UNDEFINED, +  Parser.XML.Tree.PARSE_ENABLE_NAMESPACES);]]) + test_do([[add_constant("xmlblob", "<?xml version='1.0' encoding='utf-8'?><foo xml:lang='bar' xmlns='gazonk:' xmlns:invalid='http://www.w3.org/2000/xmlns/'/>");]]) + test_eval_error([[Parser.XML.Tree.simple_parse_input(xmlblob, UNDEFINED, +  Parser.XML.Tree.PARSE_ENABLE_NAMESPACES);]]) +    test_do([[add_constant("xmlblob");]])      // NSTree      // XML NS section 2      test_any_equal([[   object x=Parser.XML.NSTree.parse_input(#"   <x>    <!-- No namespace here. -->