Perl-Email-Project / Email-Valid

perl library to validate email addresses
19 stars 19 forks source link

t/valid.t fails if Net::DNS is not installed #2

Closed mjgardner closed 11 years ago

mjgardner commented 11 years ago
[mgardner@oqn-00-build1 Email-Valid-1.191]$ prove --verbose --lib t/valid.t
t/valid.t ..
1..35
ok 1 - use Email::Valid;
ok 2 - Alfred Neuman <Neuman@BBN-TENEXA>
ok 3 - 123@example.com
ok 4 - Alfred Neuman <Neuman@BBN-TENEXA>
ok 5 - 123@example.com
ok 6 - Alfred Neuman <Neuman@BBN-TENEXA> { -fqdn => 0 }
ok 7 - spaces fudged out of an address local-part
ok 8 - spaces in localpart is not valid when not fudging
ok 9 - details are rfc822
ok 10 - spaced out address is squished
ok 11 - comments nicely dropped from an address
ok 12 - address with > 254 chars fails
ok 13 - details say address is too long
ok 14 - localpart with 64 chars or less is valid
ok 15 - localpart with 64 chars or more fails
ok 16 - details are localpart
ok 17 - space between @ and domain is valid
ok 18 - localpart in true context succeeds
ok 19 - localpart in false context is defined (bug 75736)
ok 20 - an email can start with a dash
ok 21 - an email can start with a dash (alternate calling method)
ok 22 - but a domain cannot
ok 23 - a domain cannot end with a dash either
ok 24 - but a domain may contain two dashes in a row in the middle
ok 25 - and of course two-character labels are valid!
ok 26 - onesies, too
ok 27 - blort@aol.com, with mxcheck, is ok
ok 28 - blort@will-never-exist.pobox.com, with mxcheck, is invalid
not ok 29 - yhaoo.com has a null mx record

#   Failed test 'yhaoo.com has a null mx record'
#   at t/valid.t line 150.
ok 30 - a domain literal address is okay
ok 31 - a domain literal address is not okay if we say -allow_ip=>0
ok 32 # skip tests require Net::Domain::TLD 1.65
ok 33 # skip tests require Net::Domain::TLD 1.65
ok 34 # skip tests require Net::Domain::TLD 1.65
ok 35 # skip tests require Net::Domain::TLD 1.65
# Looks like you failed 1 test of 35.
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/35 subtests
        (less 4 skipped subtests: 30 okay)

Test Summary Report
-------------------
t/valid.t (Wstat: 256 Tests: 35 Failed: 1)
  Failed test:  29
  Non-zero exit status: 1
Files=1, Tests=35,  0 wallclock secs ( 0.04 usr  0.02 sys +  0.07 cusr  0.05 csys =  0.18 CPU)
Result: FAIL
[mgardner@oqn-00-build1 Email-Valid-1.191]$ cpanm Net::DNS
--> Working on Net::DNS
Fetching http://www.cpan.org/authors/id/N/NL/NLNETLABS/Net-DNS-0.72.tar.gz ... OK
Configuring Net-DNS-0.72 ... OK
Building and testing Net-DNS-0.72 ... OK
Successfully installed Net-DNS-0.72
1 distribution installed
[mgardner@oqn-00-build1 Email-Valid-1.191]$ prove --verbose --lib t/valid.t
t/valid.t ..
1..35
ok 1 - use Email::Valid;
ok 2 - Alfred Neuman <Neuman@BBN-TENEXA>
ok 3 - 123@example.com
ok 4 - Alfred Neuman <Neuman@BBN-TENEXA>
ok 5 - 123@example.com
ok 6 - Alfred Neuman <Neuman@BBN-TENEXA> { -fqdn => 0 }
ok 7 - spaces fudged out of an address local-part
ok 8 - spaces in localpart is not valid when not fudging
ok 9 - details are rfc822
ok 10 - spaced out address is squished
ok 11 - comments nicely dropped from an address
ok 12 - address with > 254 chars fails
ok 13 - details say address is too long
ok 14 - localpart with 64 chars or less is valid
ok 15 - localpart with 64 chars or more fails
ok 16 - details are localpart
ok 17 - space between @ and domain is valid
ok 18 - localpart in true context succeeds
ok 19 - localpart in false context is defined (bug 75736)
ok 20 - an email can start with a dash
ok 21 - an email can start with a dash (alternate calling method)
ok 22 - but a domain cannot
ok 23 - a domain cannot end with a dash either
ok 24 - but a domain may contain two dashes in a row in the middle
ok 25 - and of course two-character labels are valid!
ok 26 - onesies, too
ok 27 - blort@aol.com, with mxcheck, is ok
ok 28 - blort@will-never-exist.pobox.com, with mxcheck, is invalid
ok 29 - yhaoo.com has a null mx record
ok 30 - a domain literal address is okay
ok 31 - a domain literal address is not okay if we say -allow_ip=>0
ok 32 # skip tests require Net::Domain::TLD 1.65
ok 33 # skip tests require Net::Domain::TLD 1.65
ok 34 # skip tests require Net::Domain::TLD 1.65
ok 35 # skip tests require Net::Domain::TLD 1.65
ok
All tests successful.
Files=1, Tests=35,  0 wallclock secs ( 0.04 usr  0.02 sys +  0.14 cusr  0.04 csys =  0.24 CPU)
Result: PASS
rjbs commented 11 years ago

Thanks, fixed in new release.