]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei: replace "I:"-prefixed info messages with "#"
authorEric Wong <e@80x24.org>
Tue, 9 Feb 2021 08:09:36 +0000 (07:09 -0100)
committerEric Wong <e@80x24.org>
Wed, 10 Feb 2021 06:59:10 +0000 (06:59 +0000)
The "#" is what TAP <https://testanything.org/> uses,
which is also consistent with what our (and many other)
test suites emit.

lib/PublicInbox/LEI.pm
t/lei.t

index e29b13c3a798abf11a793eb29f7075e32579bf45..5f2650876b2844dd9da18b168c77e9e7125631a9 100644 (file)
@@ -559,7 +559,7 @@ sub _lei_cfg ($;$) {
                open my $fh, '>>', $f or die "open($f): $!\n";
                @st = stat($fh) or die "fstat($f): $!\n";
                $cur_st = pack('dd', $st[10], $st[7]);
-               qerr($self, "I: $f created") if $self->{cmd} ne 'config';
+               qerr($self, "# $f created") if $self->{cmd} ne 'config';
        }
        my $cfg = PublicInbox::Config::git_config_dump($f);
        $cfg->{-st} = $cur_st;
@@ -619,7 +619,7 @@ sub lei_init {
        my @cur = stat($cur) if defined($cur);
        $cur = File::Spec->canonpath($cur // $dir);
        my @dir = stat($dir);
-       my $exists = "I: leistore.dir=$cur already initialized" if @dir;
+       my $exists = "# leistore.dir=$cur already initialized" if @dir;
        if (@cur) {
                if ($cur eq $dir) {
                        _lei_store($self, 1)->done;
@@ -638,7 +638,7 @@ E: leistore.dir=$cur already initialized and it is not $dir
        }
        lei_config($self, 'leistore.dir', $dir);
        _lei_store($self, 1)->done;
-       $exists //= "I: leistore.dir=$dir newly initialized";
+       $exists //= "# leistore.dir=$dir newly initialized";
        return qerr($self, $exists);
 }
 
diff --git a/t/lei.t b/t/lei.t
index 8e771eb5e54490faad4b53c6fff2052de85f8b86..4785accad9b30cc6f392785061e452a60e1356db 100644 (file)
--- a/t/lei.t
+++ b/t/lei.t
@@ -49,7 +49,7 @@ my $test_help = sub {
 
 my $ok_err_info = sub {
        my ($msg) = @_;
-       is(grep(!/^I:/, split(/^/, $lei_err)), 0, $msg) or
+       is(grep(!/^#/, split(/^/, $lei_err)), 0, $msg) or
                diag "$msg: err=$lei_err";
 };