summary refs log tree commit diff
path: root/gnu/packages/patches/wget-perl-5.26.patch
blob: ee3a984daaef849458ab039609ff6b7f5ade703e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
This upstream commit adjusts tests for Perl 5.26.

commit 7ffe93cabb181f39ad5091c31ab9f61bd940a55f
Author: Anton Yuzhaninov <citrin+github@citrin.ru>
Date:   Wed Apr 5 19:06:42 2017 +0300

    Fix perl warnings in tests
    
    * tests/FTPServer.pm: Escape '{' in RE to fix warnings
    * tests/FTPTest.pm: Likewise
    * tests/HTTPServer.pm: Likewise
    * tests/HTTPTest.pm: Likewise
    * tests/Test-proxied-https-auth-keepalive.px: Likewise
    * tests/Test-proxied-https-auth.px: Likewise
    Escape '{' in RE to fix warnings:
    Unescaped left brace in regex is deprecated, passed through in regex;
    marked by <-- HERE in m/{{ <-- HERE port}}/

diff --git a/tests/FTPServer.pm b/tests/FTPServer.pm
index a5185d66..cac80942 100644
--- a/tests/FTPServer.pm
+++ b/tests/FTPServer.pm
@@ -589,7 +589,7 @@ sub new
     foreach my $file (keys %{$self->{_input}})
     {
         my $ref = \$self->{_input}{$file}{content};
-        $$ref =~ s/{{port}}/$self->sockport/eg;
+        $$ref =~ s/\Q{{port}}/$self->sockport/eg;
     }
 
     return $self;
diff --git a/tests/FTPTest.pm b/tests/FTPTest.pm
index 50385ad0..0a1c768c 100644
--- a/tests/FTPTest.pm
+++ b/tests/FTPTest.pm
@@ -53,7 +53,7 @@ sub _substitute_port
 {
     my $self = shift;
     my $ret  = shift;
-    $ret =~ s/{{port}}/$self->{_server}->sockport/eg;
+    $ret =~ s/\Q{{port}}/$self->{_server}->sockport/eg;
     return $ret;
 }
 
diff --git a/tests/HTTPServer.pm b/tests/HTTPServer.pm
index dd8ec043..78609f65 100644
--- a/tests/HTTPServer.pm
+++ b/tests/HTTPServer.pm
@@ -310,7 +310,7 @@ sub _substitute_port
 {
     my $self = shift;
     my $ret  = shift;
-    $ret =~ s/{{port}}/$self->sockport/eg;
+    $ret =~ s/\Q{{port}}/$self->sockport/eg;
     return $ret;
 }
 
diff --git a/tests/HTTPTest.pm b/tests/HTTPTest.pm
index 00f079f8..6225c7f1 100644
--- a/tests/HTTPTest.pm
+++ b/tests/HTTPTest.pm
@@ -47,7 +47,7 @@ sub _substitute_port
 {
     my $self = shift;
     my $ret  = shift;
-    $ret =~ s/{{port}}/$self->{_server}->sockport/eg;
+    $ret =~ s/\Q{{port}}/$self->{_server}->sockport/eg;
     return $ret;
 }
 
diff --git a/tests/Test-proxied-https-auth-keepalive.px b/tests/Test-proxied-https-auth-keepalive.px
index 049bebec..2a18ccfd 100755
--- a/tests/Test-proxied-https-auth-keepalive.px
+++ b/tests/Test-proxied-https-auth-keepalive.px
@@ -153,7 +153,7 @@ my $cmdline = $WgetTest::WGETPATH . " --user=fiddle-dee-dee"
     . " --password=Dodgson -e https_proxy=localhost:{{port}}"
     . " --no-check-certificate"
     . " https://no.such.domain/needs-auth.txt";
-$cmdline =~ s/{{port}}/$SOCKET->sockport()/e;
+$cmdline =~ s/\Q{{port}}/$SOCKET->sockport()/e;
 
 if (defined $srcdir) {
     $VALGRIND_SUPP_FILE = $srcdir . '/valgrind-suppressions-ssl';
diff --git a/tests/Test-proxied-https-auth.px b/tests/Test-proxied-https-auth.px
index ce4e736c..878114e7 100755
--- a/tests/Test-proxied-https-auth.px
+++ b/tests/Test-proxied-https-auth.px
@@ -152,7 +152,7 @@ my $cmdline = $WgetTest::WGETPATH . " --user=fiddle-dee-dee"
     . " --password=Dodgson -e https_proxy=localhost:{{port}}"
     . " --no-check-certificate"
     . " https://no.such.domain/needs-auth.txt";
-$cmdline =~ s/{{port}}/$SOCKET->sockport()/e;
+$cmdline =~ s/\Q{{port}}/$SOCKET->sockport()/e;
 
 if (defined $srcdir) {
     $VALGRIND_SUPP_FILE = $srcdir . '/valgrind-suppressions-ssl';