#2 make test fails test 15

open
nobody
None
5
2004-01-04
2004-01-04
Bob McClure
No

make test fails thus:
.
.
t/embedded-CGI-FormMagick-Validator-Network......#
Failed test (lib/CGI/FormMagick/Validator/Network.pm at
line 80)
# 'OK'
# ne
# 'OK'
# Looks like you failed 1 tests of 49.
t/embedded-CGI-FormMagick-Validator-Network......dubious

Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 15
Failed 1/49 tests, 97.96% okay
t/embedded-CGI-FormMagick-Validator..............ok

.
.
The test involves validating "a@b" as an email address.
It is expected to be invalid, but
Mail::RFC822::Address::valid() claims it is valid, and
I agree, to wit: root@localhost.

I cobbled a quick check with this script, and it buys it.
-------- snip --------------
use Mail::RFC822::Address;
sub email_simple {
my ($fm, $data) = @_;
if (not defined $data ) {
return "You must enter an email address.";
} elsif (Mail::RFC822::Address::valid($data)) {
return "OK";
} else {
return "This field doesn't look like an
RFC822-compliant email address";
}
}

my $result = email_simple(undef, 'a@b');
print $result, "\n";
--------- snip --------------

Test environment:
Linux (RH 9)
Perl 5.8.2
Mail::RFC822::Address 0.3
CGI::FormMagick 0.89

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks