diff options
author | Jean Delvare <jdelvare@suse.de> | 2017-04-25 15:17:53 +0200 |
---|---|---|
committer | Jean Delvare <jdelvare@suse.de> | 2017-04-25 15:17:53 +0200 |
commit | 5193b137b5a9034ce79946edd40760df2f63a82a (patch) | |
tree | 93b2970c834740cc07c5908a601d4681f3c73fee | |
parent | 65c664cc7ea855384755596a325dd90f98e243c0 (diff) | |
download | quilt-5193b137b5a9034ce79946edd40760df2f63a82a.tar.gz |
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>
-rwxr-xr-x | test/run | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |