You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by un...@apache.org on 2004/02/14 20:36:01 UTC

cvs commit: cocoon-2.1/src/test/anteater bug26571SendPageRedirectTo.xml

unico       2004/02/14 11:36:01

  Added:       src/webapp/samples/test/sendpage-redirect explain-test.xml
                        flow.js sitemap.xmap
               src/test/anteater bug26571SendPageRedirectTo.xml
  Log:
  anteater test for bug 26571, redirecting in a flow-called pipeline fails
  
  Revision  Changes    Path
  1.1                  cocoon-2.1/src/webapp/samples/test/sendpage-redirect/explain-test.xml
  
  Index: explain-test.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <!-- CVS $Id: explain-test.xml,v 1.1 2004/02/14 19:36:00 unico Exp $ -->
  
  <page>
      <title>sendpage-redirect test</title>
      <content>
          <para>Test harness for
              <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26571">
                  bugzilla 26571
              </a>, redirecting from within a flow-called pipeline fails.
          </para>
          <para>
              Test links:
              <ul>
                  <li><link href="test-good">test-good</link></li>
                  <li><link href="test-bad">test-bad</link></li>
              </ul>
          </para>
      </content>
  </page>
  
  
  1.1                  cocoon-2.1/src/webapp/samples/test/sendpage-redirect/flow.js
  
  Index: flow.js
  ===================================================================
  
  function sendPageWithRedirect() {
    cocoon.sendPage("redirect",null)
  }
  
  
  
  1.1                  cocoon-2.1/src/webapp/samples/test/sendpage-redirect/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  
    <map:flow language="javascript">
       <map:script src="flow.js"/>
    </map:flow>
  
    <map:pipelines>
      <map:pipeline>
  
        <map:match pattern="test-good">
          <map:redirect-to uri="sitemap"/>
        </map:match>
  
        <map:match pattern="test-bad">
          <map:call function="sendPageWithRedirect"/>
        </map:match>
  
        <map:match pattern="redirect">
          <map:redirect-to uri="sitemap"/>
        </map:match>
  
        <map:match pattern="sitemap">
          <map:read src="sitemap.xmap"/>
        </map:match>
  
      </map:pipeline>
    </map:pipelines>
  </map:sitemap>
  
  
  1.1                  cocoon-2.1/src/test/anteater/bug26571SendPageRedirectTo.xml
  
  Index: bug26571SendPageRedirectTo.xml
  ===================================================================
  <?xml version="1.0" encoding="utf-8"?>
  
  <project name="sendpage-redirect-test" default="sendpage-redirect-test">
  
    <group id="default">
      <property name="usetidy" value="false"/>
    </group>
  
    <target name="sendpage-redirect-test">
      <property name="sendpage-redirect-test" value="${anteater.env.cocoon}/samples/test/sendpage-redirect/test"/>
  
      <httpRequest href="${sendpage-redirect-test}-good">
        <match>
          <responseCode value="302"/>
        </match>
      </httpRequest>
      
      <httpRequest href="${sendpage-redirect-test}-bad">
        <match>
          <responseCode value="302"/>
        </match>
      </httpRequest>
  
    </target>
  </project>