Add more cookie decoding test case

This commit is contained in:
Trustin Lee 2012-06-27 12:41:37 +09:00
parent a5d35f89d2
commit 90d9febbc0

View File

@ -391,6 +391,19 @@ public class CookieDecoderTest {
assertEquals("", c.getValue());
}
@Test
public void testDecodingValuesWithCommasAndEquals() {
String src = "A=v=1&lg=en-US,it-IT,it&intl=it&np=1;T=z=E";
Set<Cookie> cookies = CookieDecoder.decode(src);
Iterator<Cookie> i = cookies.iterator();
Cookie c = i.next();
assertEquals("A", c.getName());
assertEquals("v=1&lg=en-US,it-IT,it&intl=it&np=1", c.getValue());
c = i.next();
assertEquals("T", c.getName());
assertEquals("z=E", c.getValue());
}
@Test
public void testDecodingLongValue() {
String longValue =