On Tue, Apr 12, 2005 at 10:57:02PM +0200, Tels wrote:
> > Try Test::Legacy, it gives you an upgrade path away from Test.pm.
> > http://search.cpan.org/dist/Test-Legacy/
> >
> > It almost perfectly emulates the Test.pm interface and it works in
> > conjunction with other test modules. If you're worried about
> > dependencies, you can simply ship a copy of Test::Legacy and
> > Test::Builder with your module. Stick 'em in t/lib/ and put "use lib
> > qw(t/lib)" at the top of your tests.
> >
> > Then you can say:
>
> Uhm, is there any reason why you can't do this with Test::Simple, too?
> *puzzled*
If you mean replace "use Test" with "use Test::Simple" the problem is
except in the very, very simple cases Test.pm's ok() function works
differently from Test::Simple/More's ok() function. Test.pm's ok() is like
ok(), is() and like() all rolled into one.
Test.pm Test::More
ok( $foo ); == ok( $foo );
ok( $foo, $bar ); == is( $foo, $bar );
ok( $foo, '/regex/'); == like( $foo, '/regex/' );
ok( $foo, $code_ref); == is( $foo, $code_ref->() );