[nginx-tests] Tests: fixed prerequisites for regular expressions...
Maxim Dounin
mdounin at mdounin.ru
Mon Aug 12 03:37:27 UTC 2024
details: http://freenginx.org/hg/nginx-tests/rev/6b1222de8286
branches:
changeset: 1993:6b1222de8286
user: Maxim Dounin <mdounin at mdounin.ru>
date: Thu Aug 01 10:37:20 2024 +0300
description:
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.
diffstat:
proxy_protocol2_tlv.t | 2 +-
stream_map.t | 2 +-
stream_proxy_protocol2_tlv.t | 3 ++-
3 files changed, 4 insertions(+), 3 deletions(-)
diffs (37 lines):
diff --git a/proxy_protocol2_tlv.t b/proxy_protocol2_tlv.t
--- 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%%
diff --git a/stream_map.t b/stream_map.t
--- 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');
diff --git a/stream_proxy_protocol2_tlv.t b/stream_proxy_protocol2_tlv.t
--- 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%%
More information about the nginx-devel
mailing list