comparison userid.t @ 817:ada7d1ad985b

Tests: fixed occasional negative match failure in userid.t. "P3P" can appear as a substring in the Set-Cookie header value.
author Sergey Kandaurov <pluknet@nginx.com>
date Mon, 28 Dec 2015 13:04:46 +0300
parents 0597ca82c26a
children e9064d691790
comparison
equal deleted inserted replaced
816:77359b849cd5 817:ada7d1ad985b
151 isnt($cookie{'uid'}, undef, 'name default'); 151 isnt($cookie{'uid'}, undef, 'name default');
152 is($cookie{'path'}, '/', 'path default'); 152 is($cookie{'path'}, '/', 'path default');
153 is($cookie{'domain'}, undef, 'domain default'); 153 is($cookie{'domain'}, undef, 'domain default');
154 is($cookie{'expires'}, undef, 'expires default'); 154 is($cookie{'expires'}, undef, 'expires default');
155 like($cookie{'uid'}, '/\w+={0,2}$/', 'mark default'); 155 like($cookie{'uid'}, '/\w+={0,2}$/', 'mark default');
156 unlike(http_get('/'), qr/P3P/, 'p3p default'); 156 unlike(http_get('/'), qr/^P3P/m, 'p3p default');
157 like(http_get('/'), qr/X-Reset: 0/, 'uid reset variable default'); 157 like(http_get('/'), qr/X-Reset: 0/, 'uid reset variable default');
158 158
159 # name, path, domain and p3p 159 # name, path, domain and p3p
160 160
161 isnt(get_cookie('/name', 'test'), undef, 'name'); 161 isnt(get_cookie('/name', 'test'), undef, 'name');