git.shiar.nl
/
barcat.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
strip pipe arguments from test options
[barcat.git]
/
t
/
examples.t
diff --git
a/t/examples.t
b/t/examples.t
index 0b5e77855b86f7dd1163044957b3898003b8384b..ae3e7c9c8721d9a7ab43375c0f3159e48c138fa2 100755
(executable)
--- a/
t/examples.t
+++ b/
t/examples.t
@@
-2,7
+2,12
@@
use 5.014;
use warnings;
use re '/ms';
use 5.014;
use warnings;
use re '/ms';
+
use Test::More;
use Test::More;
+{ # silence fail diagnostics because of single caller
+ no warnings 'redefine';
+ sub Test::Builder::_ok_debug {}
+}
my %CMDARGS = (
ping => '-c 1',
my %CMDARGS = (
ping => '-c 1',
@@
-46,9
+51,11
@@
while (readline $input) {
# run and report unexpected results
ok(eval {
# run and report unexpected results
ok(eval {
- qx($cmd) or return;
- return $? == 0;
- }, $name) or diag($cmd);
+ my $output = qx($cmd);
+ $? == 0 or die "error status ", $? >> 8, "\n";
+ length $output or die "empty output\n";
+ return 1;
+ }, $name) or diag("Failed command\n$cmd\nfrom $filename line $.: $@");
}
done_testing();
}
done_testing();