Merge branch 'core-updates'
[jackhill/guix/guix.git] / gnu / packages / patches / wget-perl-5.26.patch
1 This upstream commit adjusts tests for Perl 5.26.
2
3 commit 7ffe93cabb181f39ad5091c31ab9f61bd940a55f
4 Author: Anton Yuzhaninov <citrin+github@citrin.ru>
5 Date: Wed Apr 5 19:06:42 2017 +0300
6
7 Fix perl warnings in tests
8
9 * tests/FTPServer.pm: Escape '{' in RE to fix warnings
10 * tests/FTPTest.pm: Likewise
11 * tests/HTTPServer.pm: Likewise
12 * tests/HTTPTest.pm: Likewise
13 * tests/Test-proxied-https-auth-keepalive.px: Likewise
14 * tests/Test-proxied-https-auth.px: Likewise
15 Escape '{' in RE to fix warnings:
16 Unescaped left brace in regex is deprecated, passed through in regex;
17 marked by <-- HERE in m/{{ <-- HERE port}}/
18
19 diff --git a/tests/FTPServer.pm b/tests/FTPServer.pm
20 index a5185d66..cac80942 100644
21 --- a/tests/FTPServer.pm
22 +++ b/tests/FTPServer.pm
23 @@ -589,7 +589,7 @@ sub new
24 foreach my $file (keys %{$self->{_input}})
25 {
26 my $ref = \$self->{_input}{$file}{content};
27 - $$ref =~ s/{{port}}/$self->sockport/eg;
28 + $$ref =~ s/\Q{{port}}/$self->sockport/eg;
29 }
30
31 return $self;
32 diff --git a/tests/FTPTest.pm b/tests/FTPTest.pm
33 index 50385ad0..0a1c768c 100644
34 --- a/tests/FTPTest.pm
35 +++ b/tests/FTPTest.pm
36 @@ -53,7 +53,7 @@ sub _substitute_port
37 {
38 my $self = shift;
39 my $ret = shift;
40 - $ret =~ s/{{port}}/$self->{_server}->sockport/eg;
41 + $ret =~ s/\Q{{port}}/$self->{_server}->sockport/eg;
42 return $ret;
43 }
44
45 diff --git a/tests/HTTPServer.pm b/tests/HTTPServer.pm
46 index dd8ec043..78609f65 100644
47 --- a/tests/HTTPServer.pm
48 +++ b/tests/HTTPServer.pm
49 @@ -310,7 +310,7 @@ sub _substitute_port
50 {
51 my $self = shift;
52 my $ret = shift;
53 - $ret =~ s/{{port}}/$self->sockport/eg;
54 + $ret =~ s/\Q{{port}}/$self->sockport/eg;
55 return $ret;
56 }
57
58 diff --git a/tests/HTTPTest.pm b/tests/HTTPTest.pm
59 index 00f079f8..6225c7f1 100644
60 --- a/tests/HTTPTest.pm
61 +++ b/tests/HTTPTest.pm
62 @@ -47,7 +47,7 @@ sub _substitute_port
63 {
64 my $self = shift;
65 my $ret = shift;
66 - $ret =~ s/{{port}}/$self->{_server}->sockport/eg;
67 + $ret =~ s/\Q{{port}}/$self->{_server}->sockport/eg;
68 return $ret;
69 }
70
71 diff --git a/tests/Test-proxied-https-auth-keepalive.px b/tests/Test-proxied-https-auth-keepalive.px
72 index 049bebec..2a18ccfd 100755
73 --- a/tests/Test-proxied-https-auth-keepalive.px
74 +++ b/tests/Test-proxied-https-auth-keepalive.px
75 @@ -153,7 +153,7 @@ my $cmdline = $WgetTest::WGETPATH . " --user=fiddle-dee-dee"
76 . " --password=Dodgson -e https_proxy=localhost:{{port}}"
77 . " --no-check-certificate"
78 . " https://no.such.domain/needs-auth.txt";
79 -$cmdline =~ s/{{port}}/$SOCKET->sockport()/e;
80 +$cmdline =~ s/\Q{{port}}/$SOCKET->sockport()/e;
81
82 if (defined $srcdir) {
83 $VALGRIND_SUPP_FILE = $srcdir . '/valgrind-suppressions-ssl';
84 diff --git a/tests/Test-proxied-https-auth.px b/tests/Test-proxied-https-auth.px
85 index ce4e736c..878114e7 100755
86 --- a/tests/Test-proxied-https-auth.px
87 +++ b/tests/Test-proxied-https-auth.px
88 @@ -152,7 +152,7 @@ my $cmdline = $WgetTest::WGETPATH . " --user=fiddle-dee-dee"
89 . " --password=Dodgson -e https_proxy=localhost:{{port}}"
90 . " --no-check-certificate"
91 . " https://no.such.domain/needs-auth.txt";
92 -$cmdline =~ s/{{port}}/$SOCKET->sockport()/e;
93 +$cmdline =~ s/\Q{{port}}/$SOCKET->sockport()/e;
94
95 if (defined $srcdir) {
96 $VALGRIND_SUPP_FILE = $srcdir . '/valgrind-suppressions-ssl';