X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=src%2Ftest_html_parser.cpp;h=f0ab6416f22808d47c2cc86d626654db839b74a3;hb=f51a51c6c6e1f8c5de6e90f548df3d8dc12e00ac;hp=aa818f9ddb7fa7449404d7732d20f7548ab00568;hpb=0ce322844494022dc85a9c776d9ff041aad17520;p=metaproxy-moved-to-github.git diff --git a/src/test_html_parser.cpp b/src/test_html_parser.cpp index aa818f9..f0ab641 100644 --- a/src/test_html_parser.cpp +++ b/src/test_html_parser.cpp @@ -54,8 +54,10 @@ class MyEvent : public mp::HTMLParserEvent { out += "\""; } - void anyTagEnd(const char *name) + void anyTagEnd(const char *name, int close_it) { + if (close_it) + out += "/"; out += ">"; } @@ -79,12 +81,15 @@ BOOST_AUTO_TEST_CASE( test_html_parser_1 ) mp::HTMLParser hp; const char* html = "some text" - "
"; const char* expected = "some text" - "
"; MyEvent e; hp.parse(e, html); + + std::cout << expected << std::endl; + std::cout << e.out << std::endl; BOOST_CHECK_EQUAL(std::string(expected), e.out); } catch (std::exception & e)