X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;ds=sidebyside;f=src%2Ftest_html_parser.cpp;h=dd66b57da908be2f26a3393e7538c1f087c01e0f;hb=55fdfbb42225f71fb791bb8f9ec033ca0fddbe44;hp=6e0ea4c9f72022f7a7afc4873703e25203c88046;hpb=0ff7436bf2ca0a279b1fefe0020ab862146306aa;p=metaproxy-moved-to-github.git diff --git a/src/test_html_parser.cpp b/src/test_html_parser.cpp index 6e0ea4c..dd66b57 100644 --- a/src/test_html_parser.cpp +++ b/src/test_html_parser.cpp @@ -70,7 +70,7 @@ public: out.append(value, len); } }; - +#if 0 BOOST_AUTO_TEST_CASE( test_html_parser_1 ) { try @@ -270,6 +270,36 @@ BOOST_AUTO_TEST_CASE( test_html_parser_6 ) BOOST_CHECK (false); } } +#endif +BOOST_AUTO_TEST_CASE( test_html_parser_7 ) +{ + try + { + mp::HTMLParser hp; + const char* html = + ""; + + const char* expected = html; + MyEvent e; + hp.set_verbose(1); + 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); + } +} /*