3
5
Fork 0
mirror of git://git.savannah.gnu.org/guix.git synced 2023-12-14 03:33:07 +01:00
guix/gnu/packages/patches/quilt-test-fix-regex.patch
Eric Bavier 68faa20e2d
quilt: Upgrade to 0.65.
* gnu/packages/patches/quilt-test-fix-regex.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/patchutils.scm (quilt)[version]: Upgrade to 0.65.
[source]: Use patch.
[arguments]: Adjust 'patch-tests' phase for new tests.  Re-enable "mail"
test.
2018-10-02 22:34:39 -05:00

41 lines
1.3 KiB
Diff

From 5193b137b5a9034ce79946edd40760df2f63a82a Mon Sep 17 00:00:00 2001
From: Jean Delvare <jdelvare@suse.de>
Date: Tue, 25 Apr 2017 15:17:53 +0200
Subject: test: Escape curly braces in regex
Curly braces in perl regex are supposed to be escaped, recent
versions of perl complain when they aren't:
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%{ <-- HERE (\w+)}/ at ./run line 114.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%{ <-- HERE \?}/ at ./run line 290.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
---
test/run | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/run b/test/run
index 942014e..03afc7a 100755
--- a/test/run
+++ b/test/run
@@ -112,7 +112,7 @@ sub flush_output()
sub substitute_vars($)
{
my ($line) = @_;
- $line =~ s[%{(\w+)}][defined $ENV{$1} ? $ENV{$1} : ""]eg;
+ $line =~ s[%\{(\w+)\}][defined $ENV{$1} ? $ENV{$1} : ""]eg;
return $line;
}
@@ -288,7 +288,7 @@ while (defined(my $line = <SOURCE>)) {
# Parse the next command
if ($line =~ s/^\s*\$ ?//) {
# Substitute %{?} with the last command's status
- $line =~ s[%{\?}][$last_status]eg;
+ $line =~ s[%\{\?\}][$last_status]eg;
chomp($prog = substitute_vars($line));
$prog_line = $lineno;
--
cgit v1.0-41-gc330