about summary refs log tree commit
diff options
context:
space:
mode:
authorTim Bunce <Tim.Bunce@pobox.com>2010-05-25 05:46:11 -0600
committerGraham Barr <gbarr@pobox.com>2012-07-16 10:20:45 -0500
commit40c02a00a682a326dee3602f094e8a79d3c2e6a1 (patch)
treeca06832337359530ec2fb8057cdb1b775a690222
parent6dfc172ab8d6d9ac8e91ee3c64ae421314402058 (diff)
downloadperl-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.t13
1 files changed, 9 insertions, 4 deletions
diff --git a/t/ftp.t b/t/ftp.t
index 32d750e..dc690b6 100644
--- a/t/ftp.t
+++ b/t/ftp.t
@@ -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;
 }