aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2015-07-06 22:37:37 +0200
committerSebastian Geerken <devnull@localhost>2015-07-06 22:37:37 +0200
commit9610fb52086c39ab10c2979c79a98079745137da (patch)
tree5df4319a20b63cbb7e0872318532087475ebb221 /test
parent9500f94781023d15783f4c8158c17c112135a221 (diff)
parent78c910dc93d8772a0b1af7fc6ae3865e2efdfb3c (diff)
Merge with main repo.
Diffstat (limited to 'test')
-rw-r--r--test/cookies.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/test/cookies.c b/test/cookies.c
index ff744c97..85031043 100644
--- a/test/cookies.c
+++ b/test/cookies.c
@@ -539,14 +539,33 @@ static void maxage()
a_Cookies_set("name=val; max-age=0", "maxage0.com", "/", NULL);
expect(__LINE__, "", "http", "maxage0.com", "/");
+ a_Cookies_set("name=val; max-age=-0", "maxage-0.com", "/", NULL);
+ expect(__LINE__, "", "http", "maxage-0.com", "/");
+
a_Cookies_set("name=val; max-age=100", "maxage100.com", "/", NULL);
expect(__LINE__, "Cookie: name=val\r\n", "http", "maxage100.com", "/");
a_Cookies_set("name=val; max-age=-100", "maxage-100.com", "/", NULL);
expect(__LINE__, "", "http", "maxage-100.com", "/");
- a_Cookies_set("name=val; max-age=2000000000", "maxage-huge.com", "/", NULL);
- expect(__LINE__, "Cookie: name=val\r\n", "http", "maxage-huge.com", "/");
+ a_Cookies_set("name=val; max-age=2000000000", "maxage2bil.com", "/", NULL);
+ expect(__LINE__, "Cookie: name=val\r\n", "http", "maxage2bil.com", "/");
+
+ a_Cookies_set("name=val; max-age=3000000000", "maxage3bil.com", "/", NULL);
+ expect(__LINE__, "Cookie: name=val\r\n", "http", "maxage3bil.com", "/");
+
+ a_Cookies_set("name=val; max-age=7000000000", "maxage7bil.com", "/", NULL);
+ expect(__LINE__, "Cookie: name=val\r\n", "http", "maxage7bil.com", "/");
+
+ a_Cookies_set("name=val; max-age=-2000000000", "maxage-2bil.com", "/",NULL);
+ expect(__LINE__, "", "http", "maxage-2bil.com", "/");
+
+ a_Cookies_set("name=val; max-age=-3000000000", "maxage-3bil.com", "/",NULL);
+ expect(__LINE__, "", "http", "maxage-3bil.com", "/");
+
+ a_Cookies_set("name=val; max-age=-7000000000", "maxage-7bil.com", "/",NULL);
+ expect(__LINE__, "", "http", "maxage-7bil.com", "/");
+
/* just having a server date shouldn't matter */
a_Cookies_set("name=val; max-age=0", "maxage0s.com", "/", server_date);