]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
test_common: fix require_git skip message
authorEric Wong <e@80x24.org>
Sat, 22 Mar 2025 20:55:43 +0000 (20:55 +0000)
committerEric Wong <e@80x24.org>
Sun, 23 Mar 2025 22:05:52 +0000 (22:05 +0000)
We need to use `sprintf("%vd")' to format the required version
v-string for human consumption.

lib/PublicInbox/TestCommon.pm

index 162cefed2b4da3e4ff165b30c3d1344d10a0c147..ec54e2f1cc1d76e0da0136d3fc73273e3dc2132f 100644 (file)
@@ -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 (;$) {