Author: jfrederic.clere(a)jboss.com
Date: 2009-07-09 13:09:05 -0400 (Thu, 09 Jul 2009)
New Revision: 1132
Modified:
sandbox/webapps/src/MyCookies.java
Log:
Add a test for case 292473.
Modified: sandbox/webapps/src/MyCookies.java
===================================================================
--- sandbox/webapps/src/MyCookies.java 2009-07-09 16:02:35 UTC (rev 1131)
+++ sandbox/webapps/src/MyCookies.java 2009-07-09 17:09:05 UTC (rev 1132)
@@ -80,7 +80,7 @@
/*
* create the name/value pairs
*/
- Test[] mytest = new Test[11];
+ Test[] mytest = new Test[13];
StringBuffer buffer = new StringBuffer();
buffer.append("<xml><name>John Doe</name><age
attribute=\"this breaks\">45</age></xml>");
mytest[0] = new Test("xmlCookie",buffer.toString());
@@ -95,8 +95,9 @@
mytest[8] = new Test("Quoted6","A");
mytest[9] = new Test("Quoted7","val'ue");
mytest[10] = new Test("Quoted8","I am \" testing...");
- mytest[10] = new Test("Quoted9","I am \r\n testing...");
-
+ mytest[11] = new Test("Quoted9","I am \r\n testing...");
+ // mytest[12] = new Test("Equal","P=I am =
Equal\n...&A=46164");
+ mytest[12] = new
Test("Equal","P=14662+26891+20253+28934+15744+22344+43641+13624+28974+15489+35353+47293+14662+26891+20253+28934+28596+27065+28648+22542&L=60766+6654+19186+43352+58684+61932+37440+23672&A=46164+56607+41861+51054&S=46164+56607+41861+51054&T=23922+55384+5601+51160+38643+36027+49212+16265+61873+55260+16665+53468&X=12795+26412+43746+37688&U=47207+55215+24609+16813+46164+56607+41861+51054&D=36080+20612+7827+5411+35188+54326+19636+46695+27748+646+37165+34626&C=11656+47389+63649+49622+46164+56607+41861+51054&");
Cookie[] cookies = request.getCookies();
if(cookies != null) {
for(int i=0;i<cookies.length;i++) {
@@ -104,6 +105,7 @@
out.println("Value=" + cookies[i].getValue() +
"<br>");
out.println("Expected=" + GetVal(mytest, cookies[i].getName())
+ "<br>");
}
+ out.println("<hr>");
}
/* create the cookies */
@@ -112,14 +114,14 @@
Cookie cookie = CreateCookie(mytest[i]);
response.addCookie(cookie);
} catch (Exception ex) {
- out.println("Cookie test: " + i + " Failed");
+ out.println("Cookie test: " + i + " Failed<br>");
}
}
Cookie cookie = new Cookie("commented", "commented cookie");
cookie.setComment("This is a comment");
response.addCookie(cookie);
- out.println("<P>");
+ out.println("<hr>");
out.println("<P>");
out.print("<form action=\"");
Show replies by date