diff options
| author | Remko Tronçon <git@el-tramo.be> | 2012-04-28 08:38:15 (GMT) | 
|---|---|---|
| committer | Remko Tronçon <git@el-tramo.be> | 2012-04-28 08:38:15 (GMT) | 
| commit | d6f10adb0a723022eb4e4b57cdfff8288145f407 (patch) | |
| tree | b50c64673b7108f2df0e5ca909b6e7346bc0fe1f | |
| parent | 96fb9a57da7b318f81245ed6f597dcd45f32a727 (diff) | |
| download | swift-d6f10adb0a723022eb4e4b57cdfff8288145f407.zip swift-d6f10adb0a723022eb4e4b57cdfff8288145f407.tar.bz2 | |
Make sure our parser doesn't handle entities.
| -rw-r--r-- | Swiften/Parser/UnitTest/XMLParserTest.cpp | 7 | 
1 files changed, 7 insertions, 0 deletions
| diff --git a/Swiften/Parser/UnitTest/XMLParserTest.cpp b/Swiften/Parser/UnitTest/XMLParserTest.cpp index 3c84220..4bdeb54 100644 --- a/Swiften/Parser/UnitTest/XMLParserTest.cpp +++ b/Swiften/Parser/UnitTest/XMLParserTest.cpp @@ -35,6 +35,7 @@ class XMLParserTest : public CppUnit::TestFixture {  		CPPUNIT_TEST(testParse_AttributeWithoutNamespace);  		CPPUNIT_TEST(testParse_AttributeWithNamespace);  		CPPUNIT_TEST(testParse_BillionLaughs); +		CPPUNIT_TEST(testParse_InternalEntity);  		//CPPUNIT_TEST(testParse_UndefinedPrefix);  		//CPPUNIT_TEST(testParse_UndefinedAttributePrefix);  		CPPUNIT_TEST_SUITE_END(); @@ -274,6 +275,12 @@ class XMLParserTest : public CppUnit::TestFixture {  			));  		} +		void testParse_InternalEntity() { +			ParserType testling(&client_); + +			CPPUNIT_ASSERT(!testling.parse("<!DOCTYPE foo [<!ENTITY bar \"Bar\">]><foo>&bar;</foo>")); +		} +  		void testParse_UndefinedPrefix() {  			ParserType testling(&client_); | 
 Swift
 Swift