# HG changeset patch # User Maxim Dounin # Date 1255385872 -14400 # Node ID 8bc9de6559a1e174cf0212adbd7de2103cee593c # Parent 4ae2198b97ec007a12a614e2c1e498dbc24ac91a Tests: add gzip module checks. diff --git a/gzip.t b/gzip.t --- a/gzip.t +++ b/gzip.t @@ -21,7 +21,7 @@ use Test::Nginx qw/ :DEFAULT :gzip /; select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->plan(6); +my $t = Test::Nginx->new()->has('gzip')->plan(6); $t->write_file_expand('nginx.conf', <<'EOF'); diff --git a/lib/Test/Nginx.pm b/lib/Test/Nginx.pm --- a/lib/Test/Nginx.pm +++ b/lib/Test/Nginx.pm @@ -58,6 +58,7 @@ sub has { mail => '--with-mail', flv => '--with-http_flv_module', rewrite => '(?s)^(?!.*--without-http_rewrite_module)', + gzip => '(?s)^(?!.*--without-http_gzip_module)', ); my $re = $regex{$feature}; diff --git a/proxy-cache.t b/proxy-cache.t --- a/proxy-cache.t +++ b/proxy-cache.t @@ -9,7 +9,7 @@ use warnings; use strict; -use Test::More tests => 9; +use Test::More; BEGIN { use FindBin; chdir($FindBin::Bin); } @@ -21,7 +21,7 @@ use Test::Nginx qw/ :DEFAULT :gzip /; select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new(); +my $t = Test::Nginx->new()->has('gzip')->plan(9); $t->write_file_expand('nginx.conf', <<'EOF'); diff --git a/ssi-include-big.t b/ssi-include-big.t --- a/ssi-include-big.t +++ b/ssi-include-big.t @@ -21,7 +21,7 @@ use Test::Nginx qw/ :DEFAULT :gzip /; select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has('rewrite')->plan(8); +my $t = Test::Nginx->new()->has('rewrite')->has('gzip')->plan(8); $t->write_file_expand('nginx.conf', <<'EOF');