gnu: Add libplist.
[jackhill/guix/guix.git] / gnu / packages / patches / quilt-test-fix-regex.patch
1 From 5193b137b5a9034ce79946edd40760df2f63a82a Mon Sep 17 00:00:00 2001
2 From: Jean Delvare <jdelvare@suse.de>
3 Date: Tue, 25 Apr 2017 15:17:53 +0200
4 Subject: test: Escape curly braces in regex
5
6 Curly braces in perl regex are supposed to be escaped, recent
7 versions of perl complain when they aren't:
8
9 Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%{ <-- HERE (\w+)}/ at ./run line 114.
10 Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%{ <-- HERE \?}/ at ./run line 290.
11
12 Signed-off-by: Jean Delvare <jdelvare@suse.de>
13 ---
14 test/run | 4 ++--
15 1 file changed, 2 insertions(+), 2 deletions(-)
16
17 diff --git a/test/run b/test/run
18 index 942014e..03afc7a 100755
19 --- a/test/run
20 +++ b/test/run
21 @@ -112,7 +112,7 @@ sub flush_output()
22 sub substitute_vars($)
23 {
24 my ($line) = @_;
25 - $line =~ s[%{(\w+)}][defined $ENV{$1} ? $ENV{$1} : ""]eg;
26 + $line =~ s[%\{(\w+)\}][defined $ENV{$1} ? $ENV{$1} : ""]eg;
27 return $line;
28 }
29
30 @@ -288,7 +288,7 @@ while (defined(my $line = <SOURCE>)) {
31 # Parse the next command
32 if ($line =~ s/^\s*\$ ?//) {
33 # Substitute %{?} with the last command's status
34 - $line =~ s[%{\?}][$last_status]eg;
35 + $line =~ s[%\{\?\}][$last_status]eg;
36
37 chomp($prog = substitute_vars($line));
38 $prog_line = $lineno;
39 --
40 cgit v1.0-41-gc330
41