Mercurial > hg > nginx-tests
changeset 100:9ddc18214854
Tests: arbitrary regexp support in has().
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 01 Oct 2009 14:28:08 +0400 |
parents | f92852da34aa |
children | 6303927c18d2 |
files | lib/Test/Nginx.pm |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/Test/Nginx.pm Wed Sep 30 22:41:59 2009 +0400 +++ b/lib/Test/Nginx.pm Thu Oct 01 14:28:08 2009 +0400 @@ -60,8 +60,11 @@ rewrite => '(?s)^(?!.*--without-http_rewrite_module)', ); + my $re = $regex{$feature}; + $re = $feature if !defined $re; + Test::More::plan(skip_all => "$feature not compiled in") - unless `$NGINX -V 2>&1` =~ $regex{$feature}; + unless `$NGINX -V 2>&1` =~ $re; return $self; }