Re: We broke M::B

[email protected] (Nicholas Clark)
Newsgroups perl.module.build
Message-ID <[email protected]>
On Tue, Aug 26, 2008 at 12:54:01PM -0400, Andy Armstrong wrote:
> We recently committed changes to Test::Harness that make the test  
> output look like this:
> 
> t/ext.t ............... ok
> t/extend.t ............ ok
> t/files.t ............. ok
> 
> Note spaces around the leader dots and the filenames keep their  
> extensions. We thought that might break something and sure enough it  
> did :)
> 
> Module::Build's tests parse the output from T::H. Obviously breaking  
> M::B is quite bad. Is there any chance that there's a new release of  
> M::B imminent? If not I guess we'll have to roll back our pretty new  
> formatting.

The tersest patch I can create that works with both the new and old formatting
is appended.

Nicholas Clark

==== //depot/perl/lib/Module/Build/t/basic.t#4 - /Volumes/Stuff/p4perl/perl/lib/Module/Build/t/basic.t ====
--- /tmp/tmp.58230.71	2008-08-26 19:15:45.000000000 +0100
+++ /Volumes/Stuff/p4perl/perl/lib/Module/Build/t/basic.t	2008-08-26 18:37:38.000000000 +0100
@@ -112,7 +112,7 @@ SKIP: {
   $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;
==== //depot/perl/lib/Module/Build/t/compat.t#5 - /Volumes/Stuff/p4perl/perl/lib/Module/Build/t/compat.t ====
--- /tmp/tmp.58230.89	2008-08-26 19:15:45.000000000 +0100
+++ /Volumes/Stuff/p4perl/perl/lib/Module/Build/t/compat.t	2008-08-26 18:45:54.000000000 +0100
@@ -175,7 +175,7 @@ ok $mb, "Module::Build->new_from_context
   ok $ran_ok, "make test without verbose ran ok";
   $output =~ s/^/# /gm;  # Don't confuse our own test output
   like $output,
-       qr/(?:# .+basic\.+ok\s+(?:[\d.]+\s*m?s\s*)?(?:# \[[\d:]+\]\s*)?)# All tests/,
+       qr/(?:# .+basic(?:\.t )?\.+ ?ok\s+(?:[\d.]+\s*m?s\s*)?(?:# \[[\d:]+\]\s*)?)# All tests/,
       'Should be non-verbose';
 
   $mb->delete_filetree($libdir);
==== //depot/perl/lib/Module/Build/t/test_type.t#3 - /Volumes/Stuff/p4perl/perl/lib/Module/Build/t/test_type.t ====
--- /tmp/tmp.58230.188	2008-08-26 19:15:45.000000000 +0100
+++ /Volumes/Stuff/p4perl/perl/lib/Module/Build/t/test_type.t	2008-08-26 18:37:13.000000000 +0100
@@ -69,7 +69,7 @@ is( $::x, 2, "called again");
 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");
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.