git.shiar.nl
/
barcat.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
weighted percentile interpolation
[barcat.git]
/
t
/
regress.t
diff --git
a/t/regress.t
b/t/regress.t
index c9107486b6fd710461bd851d3522c0e2fc0e310f..06d926e969ca339534592f1fb1e31e14b4f5c7b6 100755
(executable)
--- a/
t/regress.t
+++ b/
t/regress.t
@@
-1,7
+1,7
@@
#!/usr/bin/env perl
use 5.014;
use warnings;
#!/usr/bin/env perl
use 5.014;
use warnings;
-use re '/ms';
+use re '/ms
x
';
use Getopt::Long qw(2.32 :config gnu_getopt);
use Test::More;
use File::Basename;
use Getopt::Long qw(2.32 :config gnu_getopt);
use Test::More;
use File::Basename;
@@
-23,8
+23,7
@@
plan(tests => int @params);
for my $candidate (@params) {
my $name = basename($candidate, '.out');
$name =~ tr/_/ /;
for my $candidate (@params) {
my $name = basename($candidate, '.out');
$name =~ tr/_/ /;
- my $todo = $name =~ s/ #TODO$//;
- local $TODO = $todo ? ' ' : undef;
+ local $TODO;
if (!-e $candidate) {
local $TODO = 'missing output';
if (!-e $candidate) {
local $TODO = 'missing output';
@@
-38,12
+37,15
@@
for my $candidate (@params) {
my $script = $spec;
chomp $script;
my $script = $spec;
chomp $script;
+ $script =~ s/\h* [#]\h* todo \h* (.*?) \z//i
+ and $TODO = $+ || ' ';
my $wantexit = $script =~ s/\h+[?](\d+)\z// ? $1 : 0;
my $wantwarn = $script !~ s/[?]\z//;
my $wantexit = $script =~ s/\h+[?](\d+)\z// ? $1 : 0;
my $wantwarn = $script !~ s/[?]\z//;
+
my $shell = $script;
if ($script =~ /\|/) {
# explicit shell wrapper to capture all warnings
my $shell = $script;
if ($script =~ /\|/) {
# explicit shell wrapper to capture all warnings
- $s
cript
=~ s/'/'\\''/g;
+ $s
hell
=~ s/'/'\\''/g;
$shell = "sh -c '$shell'";
}
$shell .= ' 2>' . ($wantwarn ? '&1' : '/dev/null');
$shell = "sh -c '$shell'";
}
$shell .= ' 2>' . ($wantwarn ? '&1' : '/dev/null');