From: Vincent Pit Date: Sun, 15 Nov 2015 18:41:46 +0000 (-0200) Subject: Improve TAP regexps in t/30-skip.t X-Git-Tag: v1.18~7 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FTest-Valgrind.git;a=commitdiff_plain;h=aa878ce1d2bcea2391756feff7a015a117083a57 Improve TAP regexps in t/30-skip.t Before Test::Builder 0.87_01, "Skip" was the directive for skipped test. Moreover, the literal dots were matching anything. Spotted by Paul Howarth. --- diff --git a/t/30-skip.t b/t/30-skip.t index d073ace..b758af1 100644 --- a/t/30-skip.t +++ b/t/30-skip.t @@ -15,7 +15,7 @@ use Test::Valgrind::FakeValgrind; SKIP: { my ($stat, $out, $err) = capture_perl 'BEGIN { delete $ENV{PATH} } use Test::Valgrind; 1'; skip CAPTURE_PERL_FAILED($out) => 1 unless defined $stat; - like $out, qr/^1..0 # SKIP Empty valgrind candidates list/, + like $out, qr/^1\.\.0 # (?:SKIP|Skip) Empty valgrind candidates list/, 'correctly skip when no valgrind is available'; } @@ -31,8 +31,7 @@ SKIP: { my ($stat, $out, $err) = capture_perl "BEGIN { \$ENV{PATH} = q[$tmp_dir] } use Test::Valgrind; 1"; skip CAPTURE_PERL_FAILED($out) => 1 unless defined $stat; - like $out, qr/^1..0 # SKIP No appropriate valgrind executable could be found/, - 'correctly skip when no good valgrind was found'; + like $out, qr/^1\.\.0 # (?:SKIP|Skip) No appropriate valgrind executable could be found/, 'correctly skip when no good valgrind was found'; } SKIP: { @@ -47,7 +46,7 @@ SKIP: { my ($stat, $out, $err) = capture_perl "BEGIN { \$ENV{PATH} = q[$tmp_dir] } use Test::Valgrind no_def_supp => 1, extra_supps => [ q[t/supp/no_perl] ]; 1"; skip CAPTURE_PERL_FAILED($out) => 1 unless defined $stat; - like $out, qr/^1..0 # SKIP No compatible suppressions available/, + like $out, qr/^1\.\.0 # (?:SKIP|Skip) No compatible suppressions available/, 'correctly skip when no compatible suppressions were available'; }