X-Git-Url: http://lists.indexdata.com/cgi-bin?a=blobdiff_plain;f=src%2Ftest_filter_rewrite.cpp;h=c38c022509e7783be29e613ab3f4b475bd4aa9f0;hb=1751c7afd96e1984f5710284cdcb245a93d9ce6c;hp=b16768f11f9bd832145772db7801cda08792984e;hpb=917e40f8768670e2c6da49e9d44ca92f01ea52ac;p=metaproxy-moved-to-github.git diff --git a/src/test_filter_rewrite.cpp b/src/test_filter_rewrite.cpp index b16768f..c38c022 100644 --- a/src/test_filter_rewrite.cpp +++ b/src/test_filter_rewrite.cpp @@ -42,14 +42,14 @@ namespace mp = metaproxy_1; * The global testconfig is commented out, as it won't even compile * on old Centos5 machines struct TestConfig { - TestConfig() + TestConfig() { - std::cout << "global setup\n"; + std::cout << "global setup\n"; yaz_log_init_level(YLOG_ALL); } - ~TestConfig() - { - std::cout << "global teardown\n"; + ~TestConfig() + { + std::cout << "global teardown\n"; } }; @@ -63,12 +63,13 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 ) std::cout << "Running non-xml config test case" << std::endl; mp::RouterChain router; mp::filter::HttpRewrite fhr; - + std::string xmlconf = "\n" "\n" - " \n" + " \n" + " \n" " \n" " \n" " \n" - " \n" + " \n" + " \n" " \n" - " \n" + " \n" + " \n" " \n" + " \n" " \n" + " to='${proto}${pxhost}/${pxpath}/${host}/${path}' />\n" " \n" - " \n" - " \n" + " \n" + " \n" + " \n" + " \n" + " \n" " \n" "\n" ; @@ -99,14 +106,14 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 ) xmlNode *root_element = xmlDocGetRootElement(doc); fhr.configure(root_element, true, ""); xmlFreeDoc(doc); - + router.append(fhr); // create an http request mp::Package pack; mp::odr odr; - Z_GDU *gdu_req = z_get_HTTP_Request_uri(odr, + Z_GDU *gdu_req = z_get_HTTP_Request_uri(odr, "http://proxyhost/proxypath/targetsite/page1.html", 0, 1); pack.request() = gdu_req; @@ -127,20 +134,22 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 ) "}" "" "" - "" + "" "" "

Welcome to our website. It doesn't make it easy to get pro" "xified" "" " An absolute link" - "" " An absolute link" - "