Mercurial > hg > nginx-tests
comparison js.t @ 864:460a9cadbd2f
Tests: do not check for njs presence, just try js.t configuration.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Thu, 10 Mar 2016 17:57:13 +0300 |
parents | ad8134cd6f45 |
children | e9064d691790 |
comparison
equal
deleted
inserted
replaced
863:44a9a45aa041 | 864:460a9cadbd2f |
---|---|
19 ############################################################################### | 19 ############################################################################### |
20 | 20 |
21 select STDERR; $| = 1; | 21 select STDERR; $| = 1; |
22 select STDOUT; $| = 1; | 22 select STDOUT; $| = 1; |
23 | 23 |
24 my $t = Test::Nginx->new()->has(qw/http rewrite njs/)->plan(13) | 24 my $t = Test::Nginx->new()->has(qw/http rewrite/) |
25 ->write_file_expand('nginx.conf', <<'EOF'); | 25 ->write_file_expand('nginx.conf', <<'EOF'); |
26 | 26 |
27 %%TEST_GLOBALS%% | 27 %%TEST_GLOBALS%% |
28 | 28 |
29 daemon off; | 29 daemon off; |
155 } | 155 } |
156 } | 156 } |
157 | 157 |
158 EOF | 158 EOF |
159 | 159 |
160 $t->run(); | 160 $t->try_run('no njs available')->plan(13); |
161 | 161 |
162 ############################################################################### | 162 ############################################################################### |
163 | 163 |
164 like(http_get('/req_method'), qr/method=GET/, 'r.method'); | 164 like(http_get('/req_method'), qr/method=GET/, 'r.method'); |
165 like(http_get('/req_version'), qr/version=1.0/, 'r.httpVersion'); | 165 like(http_get('/req_version'), qr/version=1.0/, 'r.httpVersion'); |