comparison ssi.t @ 397:847ea345becb

Tests: removed TODO and try_run() checks for legacy versions.
author Sergey Kandaurov <pluknet@nginx.com>
date Mon, 05 May 2014 11:46:01 +0400
parents 4ac3588485f5
children 134ea15d7473
comparison
equal deleted inserted replaced
396:5eb0df61f371 397:847ea345becb
152 like(http_get('/test-empty3.html'), qr/HTTP/, 'empty with proxy cached'); 152 like(http_get('/test-empty3.html'), qr/HTTP/, 'empty with proxy cached');
153 153
154 # handling of escaped URIs 154 # handling of escaped URIs
155 155
156 like(http_get('/unescape1.html'), qr/^XXtestXX$/m, 'escaped in path'); 156 like(http_get('/unescape1.html'), qr/^XXtestXX$/m, 'escaped in path');
157
158 TODO: {
159 local $TODO = 'not yet' unless $t->has_version('1.5.9');
160
161 like(http_get('/unescape2.html'), qr/^XSEE-THISX$/m, 157 like(http_get('/unescape2.html'), qr/^XSEE-THISX$/m,
162 'escaped question in path'); 158 'escaped question in path');
163 like(http_get('/unescape3.html'), qr/404 Not Found/, 159 like(http_get('/unescape3.html'), qr/404 Not Found/,
164 'escaped query separator'); 160 'escaped query separator');
165 161
166 }
167
168 # handling of embedded date variables 162 # handling of embedded date variables
169
170 TODO: {
171 local $TODO = 'not yet' unless $t->has_version('1.5.10');
172 163
173 like(http_get('/var_nossi.html'), 164 like(http_get('/var_nossi.html'),
174 qr/X-Var: \w+, \d\d-\w{3}-\d{4} \d\d:\d\d:\d\d \w+/, 'no ssi'); 165 qr/X-Var: \w+, \d\d-\w{3}-\d{4} \d\d:\d\d:\d\d \w+/, 'no ssi');
175 like(http_get('/var_noformat.html'), 166 like(http_get('/var_noformat.html'),
176 qr/X-Var: \w+, \d\d-\w{3}-\d{4} \d\d:\d\d:\d\d \w+/, 'no format'); 167 qr/X-Var: \w+, \d\d-\w{3}-\d{4} \d\d:\d\d:\d\d \w+/, 'no format');
178 like(http_get('/var_format.html?custom=1'), 169 like(http_get('/var_format.html?custom=1'),
179 qr/X-Var: \w+, \d\d-\w{3}-\d{4} \d\d:\d\d:\d\d \w+/, 'custom header'); 170 qr/X-Var: \w+, \d\d-\w{3}-\d{4} \d\d:\d\d:\d\d \w+/, 'custom header');
180 like(http_get('/var_format.html'), 171 like(http_get('/var_format.html'),
181 qr/X-Var: \w+, \d\d-\w{3}-\d{4} \d\d:\d\d:\d\d \w+/, 'default header'); 172 qr/X-Var: \w+, \d\d-\w{3}-\d{4} \d\d:\d\d:\d\d \w+/, 'default header');
182 173
183 }
184
185 like(http_get('/var_format.html?custom=1'), 174 like(http_get('/var_format.html?custom=1'),
186 qr/x\w+, \d\d:\d\d:\d\dx/, 'custom ssi'); 175 qr/x\w+, \d\d:\d\d:\d\dx/, 'custom ssi');
187 like(http_get('/var_format.html'), 176 like(http_get('/var_format.html'),
188 qr/x\w+, \d\d-\w{3}-\d{4} \d\d:\d\d:\d\d \w+x/, 'default ssi'); 177 qr/x\w+, \d\d-\w{3}-\d{4} \d\d:\d\d:\d\d \w+x/, 'default ssi');
189 178