From: Eric Wong Date: Sat, 22 Mar 2025 20:55:43 +0000 (+0000) Subject: test_common: fix require_git skip message X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=04b0c6fc4bdebe8b94d40528fac6f7bc992786d7;p=thirdparty%2Fpublic-inbox.git test_common: fix require_git skip message We need to use `sprintf("%vd")' to format the required version v-string for human consumption. --- diff --git a/lib/PublicInbox/TestCommon.pm b/lib/PublicInbox/TestCommon.pm index 162cefed2..ec54e2f1c 100644 --- a/lib/PublicInbox/TestCommon.pm +++ b/lib/PublicInbox/TestCommon.pm @@ -161,9 +161,10 @@ sub require_git ($;$) { return 1 if $cur_vstr ge $req; state $cur_ver = sprintf('%vd', $cur_vstr); - return plan skip_all => "git $req+ required, have $cur_ver" if !$nr; + my $vreq = sprintf('%vd', $req); + return plan skip_all => "git $vreq+ required, have $cur_ver" if !$nr; defined(wantarray) ? undef : - skip("git $req+ required (have $cur_ver)", $nr) + skip("git $vreq+ required (have $cur_ver)", $nr) } sub require_git_http_backend (;$) {