This is always of those fun problems you can never reproduce on your own, by 
hand, but
is always happening.  Nearly every smoke includes the following failure.

../lib/Module/Build/t/extend.t..........FAILED--expected 64 tests, saw 59

Running this test with both TEST and harness by hand don't answer the question 
of
why.  Running with verbose gives me thoughts though.

ok 59 - Do not allow default-less prompt() for unattended builds
Is this a question?
ok 60 - prompt() doesn't require default for interactive builds
Say yes
ok 61 - y_n() doesn't require default for interactive build
Is this a question
ok 62 - default for prompt() without a default is ''
Is this a question [y] y
ok 63 -   prompt() with a default
Is this a question [y] y
ok 64 -   y_n() with a default
ok

My guess is that the lines are going to STDOUT and getting picked up by
the screen scraping that's happening in TEST.  My hope is that by adding
"#"s to the start of those prompts the tests will start passing.  It works
when I run "make test" from a command-line, but the smokes will be the real
test.

Steve Peters
[EMAIL PROTECTED]


Change 28045 by [EMAIL PROTECTED] on 2006/05/02 02:47:43

        Escape prompts with #'s to avoid causing tests to fail from
        the unexpected output.

Affected files ...

... //depot/perl/lib/Module/Build/t/extend.t#3 edit

Differences ...

==== //depot/perl/lib/Module/Build/t/extend.t#3 (text) ====

@@ -230,20 +230,20 @@
 
   $ENV{PERL_MM_USE_DEFAULT} = 1;
 
-  eval{ $mb->y_n("Is this a question?") };
+  eval{ $mb->y_n("# Is this a question?") };
   like $@, qr/ERROR:/, 'Do not allow default-less y_n() for unattended builds';
 
-  eval{ $ans = $mb->prompt('Is this a question?') };
+  eval{ $ans = $mb->prompt('# Is this a question?') };
   like $@, qr/ERROR:/, 'Do not allow default-less prompt() for unattended 
builds';
 
 
   $ENV{PERL_MM_USE_DEFAULT} = 0;
 
-  $ans = $mb->prompt('Is this a question?');
+  $ans = $mb->prompt('# Is this a question?');
   print "\n"; # fake <enter> after input
   is $ans, 'y', "prompt() doesn't require default for interactive builds";
 
-  $ans = $mb->y_n('Say yes');
+  $ans = $mb->y_n('# Say yes');
   print "\n"; # fake <enter> after input
   ok $ans, "y_n() doesn't require default for interactive build";
 
@@ -251,13 +251,13 @@
   # Test Defaults
   *{Module::Build::_readline} = sub { '' };
 
-  $ans = $mb->prompt("Is this a question");
+  $ans = $mb->prompt("# Is this a question");
   is $ans, '', "default for prompt() without a default is ''";
 
-  $ans = $mb->prompt("Is this a question", 'y');
+  $ans = $mb->prompt("# Is this a question", 'y');
   is $ans, 'y', "  prompt() with a default";
 
-  $ans = $mb->y_n("Is this a question", 'y');
+  $ans = $mb->y_n("# Is this a question", 'y');
   ok $ans, "  y_n() with a default";
 }
 

Attachment: signature.asc
Description: Digital signature

Reply via email to