On Tue, Sep 24, 2002 at 05:57:41PM +0200, H.Merijn Brand wrote:
> 1. use_ok should have an entry in the manual for minimal version
>
> use_ok ("Test::More", 0.47);
This currently doesn't work quite right. Observe...
$ perl -MTest::More -wle 'plan tests => 1; use_ok("Text::Soundex", 0.20)'
1..1
not ok 1 - use Text::Soundex;
# Failed test (-e at line 1)
# Tried to use 'Text::Soundex'.
# Error: Import directive '0.2' was not recognized at (eval 1) line 3
# Looks like you failed 1 tests of 1.
The trouble is use_ok does this:
require "Text::Soundex";
Text::Soundex->import(0.20);
this is different than "use Text::Soundex 0.20". In the latter, Perl
handles the version check itself. But in the former, Text::Soundex's import
routine does the work. Normally, Exporter will emulate the version check
but if you're not using Exporter, as Text::Soundex does not, anything could
happen.
For similar reasons, Test::More can't check itself.
$ perl -MTest::More -wle 'plan tests => 1; use_ok("Test::More", 0.40)'
1..1
not ok 1 - use Test::More;
# Failed test (-e at line 1)
# Tried to use 'Test::More'.
# Error: You tried to plan twice! Second plan at (eval 1) line 3
# Looks like you failed 1 tests of 1.
schwern@blackrider:~/src/devel/Test-Simple$
I'll have to put in some special case code to make it work right.
> 2. I'm testing conversions to and from Unicode
Unicode... wasn't he the bad guy in the Transformers Movie?
--
Michael G. Schwern <[EMAIL PROTECTED]> http://www.pobox.com/~schwern/
Perl Quality Assurance <[EMAIL PROTECTED]> Kwalitee Is Job One
Kids - don't try this at--oh, hell, go ahead, give it a whirl...