On Tue, Apr 12, 2005 at 01:39:59PM -0500, Walter Goulet wrote:
> I can't use Test::Simple, I have to use Test.pm for this module for
> backwards compatibility reasons.

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:

        use Test::Legacy;  # replaces use Test;

and leave the rest of your code the same.  You can also add in other
modules...

        # so as not to clash with Test::Legacy's functions
        use Test::More import => [qw(!ok !plan !skip)];


> I'm trying to replace this function call with an ok() call:
> 
> $ctx = Net::SSLeay::SSL_CTX_new() or die ("Unable to create SSL context");
> 
> Hard to tell what $ctx is if SSL_CTX_new() fails; I know it returns NULL in c.

To test for undef using Test.pm... 

        ok( $ctx, undef );


Reply via email to