Re: Test::Builder: mixing use_numbers on and off

2006-09-06 Thread Michael G Schwern

Yitzchak Scott-Thoennes wrote:

Is the avoid mixing warning out of date?  Or in accord with future TAP
plans?


That dates back from the original version of Test::Builder in 2001.  
Test::Harness has handled no numbers and mixing of with and without numbers for 
as long as I know, but not always gracefully.
Here's the TH that shipped with 5.5.4 (TH 1.1604 or something)

$ perl -wle 'require /usr/local/src/perl5.005_04/lib/Test/Harness.pm;  Test::Harness::runtests(@ARGV)' ~/devel/Test-Harness/t/nonumbers.t 
/Users/schwern/devel/Test-Harness/t/nonumbers.

Argument  isn't numeric in numeric gt () at 
/usr/local/src/perl5.005_04/lib/Test/Harness.pm line 118, GEN0 line 2.
Argument  isn't numeric in numeric gt () at 
/usr/local/src/perl5.005_04/lib/Test/Harness.pm line 118, GEN0 line 3.
Argument  isn't numeric in numeric gt () at 
/usr/local/src/perl5.005_04/lib/Test/Harness.pm line 118, GEN0 line 5.
Argument  isn't numeric in numeric gt () at 
/usr/local/src/perl5.005_04/lib/Test/Harness.pm line 118, GEN0 line 6.
Argument  isn't numeric in numeric gt () at 
/usr/local/src/perl5.005_04/lib/Test/Harness.pm line 118, GEN0 line 7.
ok

All tests successful.

Files=1,  Tests=6,  0 wallclock secs ( 0.00 cusr +  0.00 csys =  0.00 CPU)


And its possible t/TEST (the Perl core harness) didn't handle the mixing well.

Anyhow, I don't remember explicitly fixing it, must have just fixed itself.  
The warning against mixing in TB can probably go away.


Test::Builder: mixing use_numbers on and off

2006-08-15 Thread Yitzchak Scott-Thoennes
Test::Builder has a method use_numbers to turn off test numbering; this
can be useful when running tests in different processes.  But the doc
says:

 Most useful when you can't depend on the test output order, such as when
threads or forking is involved.

 Test::Harness will accept either, but avoid mixing the two styles.

 Defaults to on.

In a longer test script (doesn't test program sound silly?), I have only
a short section that is potentially going to be out of order, so I want to
say:

   $builder-use_numbers( 0 );
   ...
   $builder-current_test( blah );
   $builder-use_numbers( 1 );

around that section.  This works fine with current Test::Harness.
Is the avoid mixing warning out of date?  Or in accord with future TAP
plans?