comparison lib/Test/Nginx.pm @ 100:9ddc18214854

Tests: arbitrary regexp support in has().
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 01 Oct 2009 14:28:08 +0400
parents ecff5407867c
children 8bc9de6559a1
comparison
equal deleted inserted replaced
99:f92852da34aa 100:9ddc18214854
58 mail => '--with-mail', 58 mail => '--with-mail',
59 flv => '--with-http_flv_module', 59 flv => '--with-http_flv_module',
60 rewrite => '(?s)^(?!.*--without-http_rewrite_module)', 60 rewrite => '(?s)^(?!.*--without-http_rewrite_module)',
61 ); 61 );
62 62
63 my $re = $regex{$feature};
64 $re = $feature if !defined $re;
65
63 Test::More::plan(skip_all => "$feature not compiled in") 66 Test::More::plan(skip_all => "$feature not compiled in")
64 unless `$NGINX -V 2>&1` =~ $regex{$feature}; 67 unless `$NGINX -V 2>&1` =~ $re;
65 68
66 return $self; 69 return $self;
67 } 70 }
68 71
69 sub has_daemon($) { 72 sub has_daemon($) {