changeset 1993:6b1222de8286

Tests: fixed prerequisites for regular expressions in maps. Regular expressions in maps are only recognized when nginx is compiled with the PCRE library. The simplest way to make sure it is the case is to require the rewrite module, which cannot be compiled in without the PCRE library.
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 01 Aug 2024 10:37:20 +0300
parents d715aff0b61d
children e9235c647f45
files proxy_protocol2_tlv.t stream_map.t stream_proxy_protocol2_tlv.t
diffstat 3 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/proxy_protocol2_tlv.t
+++ b/proxy_protocol2_tlv.t
@@ -23,7 +23,7 @@ use Test::Nginx;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/http map/)->plan(14)
+my $t = Test::Nginx->new()->has(qw/http map rewrite/)->plan(14)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
--- a/stream_map.t
+++ b/stream_map.t
@@ -23,7 +23,7 @@ use Test::Nginx::Stream qw/ stream /;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/stream stream_return stream_map/)
+my $t = Test::Nginx->new()->has(qw/stream stream_return stream_map rewrite/)
 	->has(qw/http rewrite/);
 
 $t->write_file_expand('nginx.conf', <<'EOF');
--- a/stream_proxy_protocol2_tlv.t
+++ b/stream_proxy_protocol2_tlv.t
@@ -24,7 +24,8 @@ use Test::Nginx::Stream qw/ stream /;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/stream stream_return map/)->plan(14)
+my $t = Test::Nginx->new()
+	->has(qw/stream stream_return stream_map rewrite/)->plan(14)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%