Skip to content

Commit

Permalink
Test to reproduce (currently ignored) #195
Browse files Browse the repository at this point in the history
  • Loading branch information
chkal committed Jan 20, 2015
1 parent 1b80271 commit 9b5f35f
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ocpsoft.common.util.Streams;
Expand Down Expand Up @@ -83,6 +84,30 @@ public void testJoinEncodingSpaceCharacter() throws Exception
assertThat(responseContent, containsString("getParameter('param') = foo bar"));
}

@Test
@Ignore // see: https://github.com/ocpsoft/rewrite/issues/195
public void testJoinSupportsSingleCurlyBrace() throws Exception
{
HttpAction<HttpGet> action = get("/encoding/foo%7Bbar");
assertEquals(200, action.getResponse().getStatusLine().getStatusCode());

String responseContent = action.getResponseContent();
assertThat(responseContent, containsString("getRequestPath() = " + getContextPath() + "/encoding.html"));
assertThat(responseContent, containsString("getParameter('param') = foo{bar"));
}

@Test
@Ignore // see: https://github.com/ocpsoft/rewrite/issues/195
public void testJoinSupportsCurlyBraceGroup() throws Exception
{
HttpAction<HttpGet> action = get("/encoding/foo%7Bbar%7D");
assertEquals(200, action.getResponse().getStatusLine().getStatusCode());

String responseContent = action.getResponseContent();
assertThat(responseContent, containsString("getRequestPath() = " + getContextPath() + "/encoding.html"));
assertThat(responseContent, containsString("getParameter('param') = foo{bar}"));
}

/**
* Ampersands don't have to be encoded in the path segment (rfc2396, section 3.3). Make sure this works when
* transforming it into a query parameter.
Expand Down

0 comments on commit 9b5f35f

Please sign in to comment.