From 743ac758eb34f18c7e2544cbc48299662074b1ef Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 18 Jan 2019 19:40:07 +0000 Subject: t/git.t: avoid passing read-only value to git_unquote Older versions of Perl (tested 5.14.2 on Debian wheezy(*), reported by Konstantin on Perl 5.16.3) considered the result of concatenating two string literals to be a constant value. (*) not that other stuff works on wheezy, but t/git.t should. Reported-by: Konstantin Ryabitsev --- t/git.t | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/t/git.t b/t/git.t index 50ec4fbf..052e1cec 100644 --- a/t/git.t +++ b/t/git.t @@ -145,7 +145,8 @@ if ('alternates reloaded') { } use_ok 'PublicInbox::Git', qw(git_unquote); -is("foo\nbar", git_unquote('"foo\\nbar"'.''), 'unquoted newline'); -is("Eléanor", git_unquote('"El\\303\\251anor"'.''), 'unquoted octal'); +my $s; +is("foo\nbar", git_unquote($s = '"foo\\nbar"'), 'unquoted newline'); +is("Eléanor", git_unquote($s = '"El\\303\\251anor"'), 'unquoted octal'); done_testing(); -- cgit v1.2.3-24-ge0c7