X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Ftest_filter_rewrite.cpp;h=1f86a98b3e2bcca71c02f15fc0d9eadd6124a8c3;hb=d89b94329401b771c440dc6aafd72b9309a8b0ad;hp=00065a4fda955c1fadad978f1a6769c183721c57;hpb=8812a62c9cd99276c394c7f88192b9c115825ef9;p=metaproxy-moved-to-github.git diff --git a/src/test_filter_rewrite.cpp b/src/test_filter_rewrite.cpp index 00065a4..1f86a98 100644 --- a/src/test_filter_rewrite.cpp +++ b/src/test_filter_rewrite.cpp @@ -43,7 +43,6 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 ) { try { - std::cout << "Running non-xml config test case" << std::endl; mp::RouterChain router; mp::filter::HttpRewrite fhr; @@ -68,9 +67,11 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 ) " \n" " \n" " \n" + " \n" + " \n" + " \n" " \n" " \n" - " \n" " \n" @@ -80,9 +81,10 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 ) " \n" " \n" " \n" - " \n" + " \n" " \n" - " \n" + " \n" + " \n" " \n" " \n" " \n" @@ -115,7 +117,6 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 ) const char *resp_buf = "HTTP/1.1 200 OK\r\n" - "Content-Length: 441\r\n" "Content-Type: text/html\r\n" "Link: ; rel=absolute\r\n" "Link: ; rel=relative\r\n" @@ -128,7 +129,8 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 ) "" "" "" "" "

Welcome to our website. It doesn't make it easy to get pro" @@ -138,13 +140,13 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 ) "" " Another abs link" "" - "" - "" + "" + "" ""; const char *resp_expected = "HTTP/1.1 200 OK\r\n" - "Content-Length: 564\r\n" + "Content-Length: 631\r\n" "Content-Type: text/html\r\n" "Link: ; rel=absolute\r\n" "Link: ; rel=relative\r\n" @@ -157,7 +159,8 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 ) "" "" "" "" "

Welcome to our website. It doesn't make it easy to get pro" @@ -167,8 +170,8 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 ) "" " Another abs link" "" - "" - "" + "" + "" ""; Z_GDU *gdu_res; @@ -208,7 +211,7 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 ) { //compare buffers std::cout << "Expected result:\n" << resp_expected << "\n"; - std::cout << "Got result:\n" << "\n"; + std::cout << "Got result:\n"; fflush(stdout); fwrite(resp_result, 1, resp_result_len, stdout); fflush(stdout); @@ -224,12 +227,10 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 ) } } - BOOST_AUTO_TEST_CASE( test_filter_rewrite_2 ) { try { - std::cout << "Running non-xml config test case" << std::endl; mp::RouterChain router; mp::filter::HttpRewrite fhr; @@ -264,12 +265,6 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_2 ) " \n" " \n" " \n" - " \n" - " \n" - " \n" - " \n" - " \n" - " \n" " \n" " \n" " \n" @@ -301,7 +296,6 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_2 ) const char *resp_buf = "HTTP/1.1 200 OK\r\n" - "Content-Length: 140\r\n" "Content-Type: application/javascript\r\n" "Link: ; rel=absolute\r\n" "Link: ; rel=relative\r\n" @@ -362,7 +356,7 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_2 ) { //compare buffers std::cout << "Expected result:\n" << resp_expected << "\n"; - std::cout << "Got result:\n" << "\n"; + std::cout << "Got result:\n"; fflush(stdout); fwrite(resp_result, 1, resp_result_len, stdout); fflush(stdout);