]> Sergey Matveev's repositories - public-inbox.git/commitdiff
test_common: lei_ok: improve diagnostics
authorEric Wong <e@80x24.org>
Sat, 3 Apr 2021 10:48:24 +0000 (10:48 +0000)
committerEric Wong <e@80x24.org>
Sat, 3 Apr 2021 18:38:45 +0000 (18:38 +0000)
$? is useful, as is labeling lei_err since I'm easily-confused :x

lib/PublicInbox/TestCommon.pm

index d6e090dd14b3780b855b5afbdd2380559063bcc2..d506e4b5b5b8d0591ae1dbaf13f7ee9fbe344db2 100644 (file)
@@ -494,7 +494,8 @@ sub lei_ok (@) {
                        s!\Q$PWD\E\b!\$PWD!g;
                }
        }
-       ok(lei(@_), "lei @msg". ($msg ? " ($$msg)" : '')) or diag $lei_err;
+       ok(lei(@_), "lei @msg". ($msg ? " ($$msg)" : '')) or
+               diag "\$?=$? err=$lei_err";
 }
 
 sub json_utf8 () {