diff h2_server_tokens.t @ 1900:236d038dc04a

Tests: suppress "listen .. http2;" deprecation warnings.
author Sergey Kandaurov <pluknet@nginx.com>
date Wed, 31 May 2023 13:29:34 +0400
parents 5f46af4707e7
children 78452573505c
line wrap: on
line diff
--- a/h2_server_tokens.t
+++ b/h2_server_tokens.t
@@ -23,7 +23,7 @@ use Test::Nginx::HTTP2;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/http http_v2 rewrite/)
+my $t = Test::Nginx->new()->has(qw/http http_v2 rewrite/)->plan(12)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
@@ -88,7 +88,11 @@ http {
 
 EOF
 
-$t->run()->plan(12);
+# suppress deprecation warning
+
+open OLDERR, ">&", \*STDERR; close STDERR;
+$t->run();
+open STDERR, ">&", \*OLDERR;
 
 ###############################################################################