Mercurial > hg > nginx-tests
comparison lib/Test/Nginx.pm @ 1053:fbf731526f49
Tests: relaxed check for known dynamic modules.
Permit an optional suffix within dynamic module file names.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Mon, 10 Oct 2016 12:25:09 +0300 |
parents | 3667fe923239 |
children | d62747c321a6 |
comparison
equal
deleted
inserted
replaced
1052:7cf9b3e849d2 | 1053:fbf731526f49 |
---|---|
195 | 195 |
196 return 1 if $self->{_configure_args} =~ $re; | 196 return 1 if $self->{_configure_args} =~ $re; |
197 | 197 |
198 my %modules = ( | 198 my %modules = ( |
199 image_filter | 199 image_filter |
200 => 'ngx_http_image_filter_module.so', | 200 => 'ngx_http_image_filter_module', |
201 perl => 'ngx_http_perl_module.so', | 201 perl => 'ngx_http_perl_module', |
202 xslt => 'ngx_http_xslt_filter_module.so', | 202 xslt => 'ngx_http_xslt_filter_module', |
203 mail => 'ngx_mail_module.so', | 203 mail => 'ngx_mail_module', |
204 stream => 'ngx_stream_module.so', | 204 stream => 'ngx_stream_module', |
205 ); | 205 ); |
206 | 206 |
207 my $module = $modules{$feature}; | 207 my $module = $modules{$feature}; |
208 if (defined $module && defined $ENV{TEST_NGINX_GLOBALS}) { | 208 if (defined $module && defined $ENV{TEST_NGINX_GLOBALS}) { |
209 $re = qr/load_module\s+[^;]*\Q$module\E\s*;/; | 209 $re = qr/load_module\s+[^;]*\Q$module\E[-\w]*\.so\s*;/; |
210 return 1 if $ENV{TEST_NGINX_GLOBALS} =~ $re; | 210 return 1 if $ENV{TEST_NGINX_GLOBALS} =~ $re; |
211 } | 211 } |
212 | 212 |
213 return 0; | 213 return 0; |
214 } | 214 } |