summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Parser/UnitTest/XMLParserTest.cpp')
-rw-r--r--Swiften/Parser/UnitTest/XMLParserTest.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/Swiften/Parser/UnitTest/XMLParserTest.cpp b/Swiften/Parser/UnitTest/XMLParserTest.cpp
index b593aa7..9e9012b 100644
--- a/Swiften/Parser/UnitTest/XMLParserTest.cpp
+++ b/Swiften/Parser/UnitTest/XMLParserTest.cpp
@@ -217,6 +217,15 @@ class XMLParserTest : public CppUnit::TestFixture {
217 CPPUNIT_ASSERT_EQUAL(std::string("iq"), client_.events[1].data); 217 CPPUNIT_ASSERT_EQUAL(std::string("iq"), client_.events[1].data);
218 } 218 }
219 219
220 void testParse_CompleteDocument() {
221 ParserType testling(&client_);
222
223 CPPUNIT_ASSERT(!testling.parse("<iq", true));
224 CPPUNIT_ASSERT(!testling.parse("<iq>", true));
225 CPPUNIT_ASSERT(!testling.parse("<iq><child>foo</child>", true));
226 CPPUNIT_ASSERT(testling.parse("<iq><child>foo</child></iq>", true));
227 }
228
220 void testParse_WhitespaceInAttribute() { 229 void testParse_WhitespaceInAttribute() {
221 ParserType testling(&client_); 230 ParserType testling(&client_);
222 231