Add more cookie decoding test case

This commit is contained in:
Trustin Lee 2012-06-27 12:41:37 +09:00
parent de20883517
commit 9cc9f4e1ec

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 =