Mercurial > hg > nginx-tests
comparison ssi.t @ 617:35832048546e
Tests: respected custom locales when parsing $date_gmt in ssi.t.
Notably, this fixes tests on win32 with cp1251.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Fri, 03 Jul 2015 14:50:26 +0300 |
parents | 6c0a5903d0ae |
children | e9064d691790 |
comparison
equal
deleted
inserted
replaced
616:e9f48f1e905b | 617:35832048546e |
---|---|
175 | 175 |
176 } | 176 } |
177 | 177 |
178 # handling of embedded date variables | 178 # handling of embedded date variables |
179 | 179 |
180 my $re_date_gmt = qr/X-Var: x\w+, \d\d-\w{3}-\d{4} \d\d:\d\d:\d\d [\w ]+x/; | 180 my $re_date_gmt = qr/X-Var: x.+, \d\d-.+-\d{4} \d\d:\d\d:\d\d .+x/; |
181 | 181 |
182 like(http_get('/var_nossi.html'), $re_date_gmt, 'no ssi'); | 182 like(http_get('/var_nossi.html'), $re_date_gmt, 'no ssi'); |
183 like(http_get('/var_noformat.html'), $re_date_gmt, 'no format'); | 183 like(http_get('/var_noformat.html'), $re_date_gmt, 'no format'); |
184 | 184 |
185 like(http_get('/var_format.html?custom=1'), $re_date_gmt, 'custom header'); | 185 like(http_get('/var_format.html?custom=1'), $re_date_gmt, 'custom header'); |
186 like(http_get('/var_format.html'), $re_date_gmt, 'default header'); | 186 like(http_get('/var_format.html'), $re_date_gmt, 'default header'); |
187 | 187 |
188 like(http_get('/var_format.html?custom=1'), | 188 like(http_get('/var_format.html?custom=1'), |
189 qr/x\w+, \d\d:\d\d:\d\dx/, 'custom ssi'); | 189 qr/x.+, \d\d:\d\d:\d\dx/, 'custom ssi'); |
190 like(http_get('/var_format.html'), | 190 like(http_get('/var_format.html'), |
191 qr/x\w+, \d\d-\w{3}-\d{4} \d\d:\d\d:\d\d [\w ]+x/, 'default ssi'); | 191 qr/x.+, \d\d-.+-\d{4} \d\d:\d\d:\d\d .+x/, 'default ssi'); |
192 | 192 |
193 ############################################################################### | 193 ############################################################################### |