From: Eric Wong Date: Fri, 18 Jan 2019 19:40:07 +0000 (+0000) Subject: t/git.t: avoid passing read-only value to git_unquote X-Git-Tag: v1.2.0~404 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=743ac758eb34f18c7e2544cbc48299662074b1ef;p=public-inbox.git 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 --- 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();