If you like this site, I would appreciate a gift from my wishlist.

Test.pm to Test::More Partial Conversion

Previously Perl test-programs used the built-in Test.pm module, but it has many limitations. Test::More is much better, but its ok() method is incompatible with Test.pm. As a result, I'm providing this script to do a partial machine conversion of Test.pm-based legacy scripts to Test::More. It makes use of PPI - The Perl Parsing Interface

Download

Limitations

  • Does not translate the “use Test;” to “use Test::More” or convert the plan.

  • No option to avoid adding the Test-Count annotations.

  • Can mess up single-parameter ok() tests with low-precedence operators such as not

  • Does not handle counts of tests inside loops.

  • No correctness tests.

  • Not packaged as a CPAN distribution.

Patches for some of these would be welcome.

Licence

Test.pm-to-Test-More.pl is licensed under the MIT/X11 licence

News

Blog Posts