X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Ftest_html_parser.cpp;h=6e0ea4c9f72022f7a7afc4873703e25203c88046;hb=54c6c2c4fa4378ced846240bea454bc9583f48da;hp=370ff725354d1d9b31c21a78a08347332b1bd2df;hpb=577119fc1080b77c58b08db6d6c0114398494a33;p=metaproxy-moved-to-github.git
diff --git a/src/test_html_parser.cpp b/src/test_html_parser.cpp
index 370ff72..6e0ea4c 100644
--- a/src/test_html_parser.cpp
+++ b/src/test_html_parser.cpp
@@ -187,7 +187,7 @@ BOOST_AUTO_TEST_CASE( test_html_parser_4 )
mp::HTMLParser hp;
const char* html =
"\n"
- "";
+ "";
const char* expected = html;
MyEvent e;
@@ -241,6 +241,36 @@ BOOST_AUTO_TEST_CASE( test_html_parser_5 )
}
}
+BOOST_AUTO_TEST_CASE( test_html_parser_6 )
+{
+ try
+ {
+ mp::HTMLParser hp;
+ const char* html =
+ "";
+
+ const char* expected = html;
+ MyEvent e;
+ hp.set_verbose(0);
+ hp.parse(e, html);
+
+ BOOST_CHECK_EQUAL(std::string(expected), e.out);
+ if (std::string(expected) != e.out)
+ {
+ std::cout << "Expected" << std::endl;
+ std::cout << expected << std::endl;
+ std::cout << "Got" << std::endl;
+ std::cout << e.out << std::endl;
+ }
+ }
+ catch (std::exception & e)
+ {
+ std::cout << e.what();
+ std::cout << std::endl;
+ BOOST_CHECK (false);
+ }
+}
+
/*
* Local variables: