"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "t/cookie.t" between
CGI-4.44.tar.gz and CGI-4.45.tar.gz

About: CGI.pm is a Perl5 library for writing World Wide Web CGI scripts.

cookie.t  (CGI-4.44):cookie.t  (CGI-4.45)
skipping to change at line 370 skipping to change at line 370
is($c->path('/basket/'), '/basket/', 'path is set correctly'); is($c->path('/basket/'), '/basket/', 'path is set correctly');
is($c->path, '/basket/', 'path now returns updated value'); is($c->path, '/basket/', 'path now returns updated value');
ok($c->secure, 'secure attribute is set'); ok($c->secure, 'secure attribute is set');
ok(!$c->secure(0), 'secure attribute is cleared'); ok(!$c->secure(0), 'secure attribute is cleared');
ok(!$c->secure, 'secure attribute is cleared'); ok(!$c->secure, 'secure attribute is cleared');
is($c->samesite, 'Strict', 'SameSite is correct'); is($c->samesite, 'Strict', 'SameSite is correct');
is($c->samesite('Lax'), 'Lax', 'SameSite is set correctly'); is($c->samesite('Lax'), 'Lax', 'SameSite is set correctly');
is($c->samesite, 'Lax', 'SameSite now returns updated value'); is($c->samesite, 'Lax', 'SameSite now returns updated value');
is($c->samesite('None'),'None', 'SameSite is set correctly');
is($c->samesite, 'None', 'SameSite now returns updated value');
is($c->samesite('Bad'), 'None', 'SameSite unknown values ignored');
is($c->samesite, 'None', 'SameSite returns previous value');
} }
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# Max-age # Max-age
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
MAX_AGE: { MAX_AGE: {
my $cookie = CGI::Cookie->new( -name=>'a', value=>'b', '-expires' => 'now',) ; my $cookie = CGI::Cookie->new( -name=>'a', value=>'b', '-expires' => 'now',) ;
is $cookie->expires, 'Thu, 01-Jan-1970 00:01:40 GMT', 'expires is correct'; is $cookie->expires, 'Thu, 01-Jan-1970 00:01:40 GMT', 'expires is correct';
is $cookie->max_age => undef, 'max-age is undefined when setting expires'; is $cookie->max_age => undef, 'max-age is undefined when setting expires';
 End of changes. 1 change blocks. 
0 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)