diff options
author | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-05-10 19:15:44 +0000 |
---|---|---|
committer | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-05-10 19:15:44 +0000 |
commit | 7bda2cb529550fae678224102e1c5d0697dacf04 (patch) | |
tree | bfd1821299e405ad8f82b8b19df4ccc7188e5836 /tests/test_parse.cpp | |
parent | 55f3cba20c5fc037e9f5973984ea9d596680a6f8 (diff) |
Implemented better DOCTYPE parsing, added more DOCTYPE tests
git-svn-id: http://pugixml.googlecode.com/svn/trunk@409 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'tests/test_parse.cpp')
-rw-r--r-- | tests/test_parse.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/tests/test_parse.cpp b/tests/test_parse.cpp index 0719e5d..fb0dd23 100644 --- a/tests/test_parse.cpp +++ b/tests/test_parse.cpp @@ -497,35 +497,6 @@ TEST(parse_declaration_error) CHECK(doc.load(STR("<?xml version='1?>"), parse_minimal | parse_declaration).status == status_bad_attribute);
}
-TEST(parse_doctype_skip)
-{
- xml_document doc;
- CHECK(doc.load(STR("<!DOCTYPE doc>")) && !doc.first_child());
- CHECK(doc.load(STR("<!DOCTYPE doc SYSTEM 'foo'>")) && !doc.first_child());
- CHECK(doc.load(STR("<!DOCTYPE doc SYSTEM \"foo\">")) && !doc.first_child());
- CHECK(doc.load(STR("<!DOCTYPE doc PUBLIC \"foo\" 'bar'>")) && !doc.first_child());
- CHECK(doc.load(STR("<!DOCTYPE doc PUBLIC \"foo'\">")) && !doc.first_child());
- CHECK(doc.load(STR("<!DOCTYPE doc SYSTEM 'foo' [<!ELEMENT foo 'ANY'>]>")) && !doc.first_child());
-
- CHECK(doc.load(STR("<!DOCTYPE doc SYSTEM 'foo' [<!ELEMENT foo 'ANY'>]><node/>")));
- CHECK_NODE(doc, STR("<node />"));
-}
-
-TEST(parse_doctype_error)
-{
- xml_document doc;
- CHECK(doc.load(STR("<!DOCTYPE")).status == status_bad_doctype);
- CHECK(doc.load(STR("<!DOCTYPE doc")).status == status_bad_doctype);
- CHECK(doc.load(STR("<!DOCTYPE doc SYSTEM 'foo")).status == status_bad_doctype);
- CHECK(doc.load(STR("<!DOCTYPE doc SYSTEM \"foo")).status == status_bad_doctype);
- CHECK(doc.load(STR("<!DOCTYPE doc PUBLIC \"foo\" 'bar")).status == status_bad_doctype);
- CHECK(doc.load(STR("<!DOCTYPE doc PUBLIC \"foo'\"")).status == status_bad_doctype);
- CHECK(doc.load(STR("<!DOCTYPE doc SYSTEM 'foo' [<!ELEMENT foo 'ANY")).status == status_bad_doctype);
- CHECK(doc.load(STR("<!DOCTYPE doc SYSTEM 'foo' [<!ELEMENT foo 'ANY'>")).status == status_bad_doctype);
- CHECK(doc.load(STR("<!DOCTYPE doc SYSTEM 'foo' [<!ELEMENT foo 'ANY'>]")).status == status_bad_doctype);
- CHECK(doc.load(STR("<!DOCTYPE doc SYSTEM 'foo' [<!ELEMENT foo 'ANY'>] ")).status == status_bad_doctype);
-}
-
TEST(parse_empty)
{
xml_document doc;
|