Mercurial > hg > nginx-tests
comparison perl.t @ 1987:a095b971fbcc default tip
Tests: removed TODO and try_run() checks for legacy versions.
For h2_http2.t, try_run() is preserved to ensure that deprecation
warnings for "listen ... http2" are suppressed, yet plan() is reported
before try_run(), so failure to start will be properly reported.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 04 Jun 2024 18:38:01 +0300 |
parents | fb88778d4580 |
children |
comparison
equal
deleted
inserted
replaced
1986:11463d379570 | 1987:a095b971fbcc |
---|---|
151 'GET / HTTP/1.0' . CRLF | 151 'GET / HTTP/1.0' . CRLF |
152 . 'X-Foo: foo' . CRLF | 152 . 'X-Foo: foo' . CRLF |
153 . 'Host: localhost' . CRLF . CRLF | 153 . 'Host: localhost' . CRLF . CRLF |
154 ), qr/xfoo: foo/, 'perl header_in unknown'); | 154 ), qr/xfoo: foo/, 'perl header_in unknown'); |
155 | 155 |
156 TODO: { | |
157 local $TODO = 'not yet' unless $t->has_version('1.23.0'); | |
158 | |
159 like(http( | 156 like(http( |
160 'GET / HTTP/1.0' . CRLF | 157 'GET / HTTP/1.0' . CRLF |
161 . 'X-Foo: foo' . CRLF | 158 . 'X-Foo: foo' . CRLF |
162 . 'X-Foo: bar' . CRLF | 159 . 'X-Foo: bar' . CRLF |
163 . 'Host: localhost' . CRLF . CRLF | 160 . 'Host: localhost' . CRLF . CRLF |
164 ), qr/xfoo: foo, bar/, 'perl header_in unknown2'); | 161 ), qr/xfoo: foo, bar/, 'perl header_in unknown2'); |
165 | 162 |
166 } | |
167 | |
168 like(http( | 163 like(http( |
169 'GET / HTTP/1.0' . CRLF | 164 'GET / HTTP/1.0' . CRLF |
170 . 'Cookie: foo' . CRLF | 165 . 'Cookie: foo' . CRLF |
171 . 'Host: localhost' . CRLF . CRLF | 166 . 'Host: localhost' . CRLF . CRLF |
172 ), qr/cookie: foo/, 'perl header_in cookie'); | 167 ), qr/cookie: foo/, 'perl header_in cookie'); |
189 . 'X-Forwarded-For: foo1' . CRLF | 184 . 'X-Forwarded-For: foo1' . CRLF |
190 . 'X-Forwarded-For: foo2' . CRLF | 185 . 'X-Forwarded-For: foo2' . CRLF |
191 . 'Host: localhost' . CRLF . CRLF | 186 . 'Host: localhost' . CRLF . CRLF |
192 ), qr/xff: foo1, foo2/, 'perl header_in xff2'); | 187 ), qr/xff: foo1, foo2/, 'perl header_in xff2'); |
193 | 188 |
194 TODO: { | |
195 local $TODO = 'not yet' unless $t->has_version('1.23.0'); | |
196 | |
197 like(http( | 189 like(http( |
198 'GET / HTTP/1.0' . CRLF | 190 'GET / HTTP/1.0' . CRLF |
199 . 'Connection: close' . CRLF | 191 . 'Connection: close' . CRLF |
200 . 'Host: localhost' . CRLF . CRLF | 192 . 'Host: localhost' . CRLF . CRLF |
201 ), qr/connection: close/, 'perl header_in connection'); | 193 ), qr/connection: close/, 'perl header_in connection'); |
204 'GET / HTTP/1.0' . CRLF | 196 'GET / HTTP/1.0' . CRLF |
205 . 'Connection: close' . CRLF | 197 . 'Connection: close' . CRLF |
206 . 'Connection: foo' . CRLF | 198 . 'Connection: foo' . CRLF |
207 . 'Host: localhost' . CRLF . CRLF | 199 . 'Host: localhost' . CRLF . CRLF |
208 ), qr/connection: close, foo/, 'perl header_in connection2'); | 200 ), qr/connection: close, foo/, 'perl header_in connection2'); |
209 | |
210 } | |
211 | 201 |
212 # headers_out content-length tests with range filter | 202 # headers_out content-length tests with range filter |
213 | 203 |
214 like(http_get('/range'), qr/Content-Length: 42.*^x{42}$/ms, | 204 like(http_get('/range'), qr/Content-Length: 42.*^x{42}$/ms, |
215 'perl header_out content-length'); | 205 'perl header_out content-length'); |