Ruleset functional MP-469
[metaproxy-moved-to-github.git] / src / test_filter_rewrite.cpp
index 68acc0f..360246a 100644 (file)
@@ -68,9 +68,11 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 )
             " </request>\n"
             " <response verbose=\"1\">\n"
             "  <rule name=\"null\"/>\n"
+            "  <rule name=\"cx\">\n"
+            "     <rewrite from='^cx' to='cy'/>\n"
+            "  </rule>\n"
             "  <rule name=\"url\">\n"
             "     <rewrite from='foo' to='bar'/>\n"
-            "     <rewrite from='^cx' to='cy'/>\n"
             "     <rewrite from='"
     "(?&lt;proto>https?://)(?&lt;host>[^/?# &quot;&apos;>]+)/(?&lt;path>[^  &quot;&apos;>]+)'\n"
             "            to='${proto}${pxhost}/${pxpath}/${host}/${path}' />\n"
@@ -82,7 +84,7 @@ BOOST_AUTO_TEST_CASE( test_filter_rewrite_1 )
             "    <within tag=\"body\" attr=\"background\" rule=\"null\"/>\n"
             "    <within tag=\"script\" attr=\"#text\" type=\"quoted-literal\" rule=\"url\"/>\n"
             "    <within tag=\"style\" attr=\"#text\" rule=\"url\"/>\n"
-            "    <within attr=\"href|src\" rule=\"url\"/>\n"
+            "    <within attr=\"href|src\" rule=\"url,cx\"/>\n"
             "    <within attr=\"onclick\" type=\"quoted-literal\" rule=\"url\"/>\n"
             "  </content>\n"
             "  <content type=\"quoted-literal\" mime=\".*javascript\">\n"