git.shiar.nl
/
barcat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0bfa64f
)
capture error messages from examples
author
Mischa POSLAWSKY
<perl@shiar.org>
Fri, 19 Mar 2021 02:40:22 +0000
(
03:40
+0100)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Mon, 18 Apr 2022 09:04:29 +0000
(11:04 +0200)
t/examples.t
patch
|
blob
|
history
diff --git
a/t/examples.t
b/t/examples.t
index 52e7a5a7b732f06bec7a4037617d8eb36afa1e7d..1af87e5fa5a368e799f589d5f6a2393f5d67dc73 100755
(executable)
--- a/
t/examples.t
+++ b/
t/examples.t
@@
-52,8
+52,9
@@
while (readline $input) {
# run and report unexpected results
ok(eval {
- run(\@cmd, \undef, \my $output);
- $? == 0 or die "error status ", $? >> 8, "\n";
+ run(\@cmd, \undef, \my $output, \my $error);
+ die("error message:\n $error\n") if $error;
+ $? == 0 or die "exit status ", $? >> 8, "\n";
length $output or die "empty output\n";
return 1;
}, $name) or diag("Failed command\n@cmd\nfrom $filename line $.: $@");