On Thu, Aug 28, 2008 at 09:59:50AM -0700, Eric Wilhelm wrote:
> # from Ken Williams
> # on Thursday 28 August 2008 06:26:
>
> >This doesn't apply cleanly to the latest SVN sources for M::B, perhaps
> >it's already been fixed there?
> >> ...
> >> t/compat.t ...
> >> - qr/(?:# .+basic\.+ok\s+(?:[\d.]+\s*m?s\s*)?(?:#
> >> \[[\d:]+\]\s*)?)# All tests/,
>
> No, but it is different.
It was changed recently:
$ svn log -r11415:11416
------------------------------------------------------------------------
r11416 | kwilliams | 2008-06-12 15:59:11 +0100 (Thu, 12 Jun 2008) | 1 line
Allow trailing .t to be present in non-verbose test output
------------------------------------------------------------------------
$ svn diff -r11415:11416
Index: t/compat.t
===================================================================
--- t/compat.t (revision 11415)
+++ t/compat.t (revision 11416)
@@ -211,7 +211,7 @@
ok $ran_ok, "make test without verbose ran ok";
$output =~ s/^/# /gm; # Don't confuse our own test output
like $output,
- qr/# .+basic[.\s#]+ok[.\s#]+All tests successful/,
+ qr/# .+basic(\.t)?[.\s#]+ok[.\s#]+All tests successful/,
'Should be non-verbose';
(my $libdir2 = $libdir) =~ s/libdir/lbiidr/;
Index: Changes
===================================================================
--- Changes (revision 11415)
+++ Changes (revision 11416)
@@ -1,5 +1,10 @@
Revision history for Perl extension Module::Build.
+ - Some versions of Test::Harness (or something) seem to not be
+ stripping the ".t" suffix when outputting test reports, which was
+ causing one of our tests in t/compat.t to fail. Fixed. [Spotted by
+ a smoke tester]
+
- Most Unix platforms seem to allow hyphens in usernames, so we honor
this in our de-tilde-fying methods now. [Spotted by s-murata]
The other two still need patching to cope. Patch against Module::Build's svn
appended.
Nicholas Clark
Index: t/test_type.t
===================================================================
--- t/test_type.t (revision 11688)
+++ t/test_type.t (working copy)
@@ -61,7 +61,7 @@
my $output = uc(stdout_of(
sub {$mb->dispatch('testspecial', verbose => 0)}
));
-like($output, qr/\.\.OK/);
+like($output, qr/\.\. ?OK/);
is($::x, 3, "called a third time");
Index: t/basic.t
===================================================================
--- t/basic.t (revision 11688)
+++ t/basic.t (working copy)
@@ -105,7 +105,7 @@
$mb->add_to_cleanup('save_out');
# Use uc() so we don't confuse the current test output
like uc(stdout_of( sub {$mb->dispatch('test', verbose => 1)} )), qr/^OK \d/m;
- like uc(stdout_of( sub {$mb->dispatch('test', verbose => 0)} )), qr/\.\.OK/;
+ like uc(stdout_of( sub {$mb->dispatch('test', verbose => 0)} )), qr/\.\.
?OK/;
$mb->dispatch('realclean');
$dist->clean;