diff options
author | Tim Bunce <Tim.Bunce@pobox.com> | 2010-05-25 05:46:11 -0600 |
---|---|---|
committer | Graham Barr <gbarr@pobox.com> | 2012-07-16 10:20:45 -0500 |
commit | 40c02a00a682a326dee3602f094e8a79d3c2e6a1 (patch) | |
tree | ca06832337359530ec2fb8057cdb1b775a690222 | |
parent | 6dfc172ab8d6d9ac8e91ee3c64ae421314402058 (diff) | |
download | perl-libnet-40c02a00a682a326dee3602f094e8a79d3c2e6a1.tar.gz |
Use correct TAP syntax to show reason for skipping (ftp) tests.
Separate ftp_testhost and test_hosts checks.
-rw-r--r-- | t/ftp.t | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -6,18 +6,23 @@ BEGIN { @INC = '../lib'; } if (!eval "require Socket") { - print "1..0 # no Socket\n"; exit 0; + print "1..0 # Skip: no Socket module\n"; exit 0; } if (ord('A') == 193 && !eval "require Convert::EBCDIC") { - print "1..0 # EBCDIC but no Convert::EBCDIC\n"; exit 0; + print "1..0 # Skip: EBCDIC but no Convert::EBCDIC\n"; exit 0; } } use Net::Config; use Net::FTP; -unless(defined($NetConfig{ftp_testhost}) && $NetConfig{test_hosts}) { - print "1..0\n"; +unless(defined($NetConfig{ftp_testhost})) { + print "1..0 # Skip: no ftp_testhost defined in config\n"; + exit 0; +} + +unless($NetConfig{test_hosts}) { + print "1..0 # Skip: test_hosts not enabled in config\n"; exit 0; } |