From 40c02a00a682a326dee3602f094e8a79d3c2e6a1 Mon Sep 17 00:00:00 2001 From: Tim Bunce Date: Tue, 25 May 2010 05:46:11 -0600 Subject: Use correct TAP syntax to show reason for skipping (ftp) tests. Separate ftp_testhost and test_hosts checks. --- t/ftp.t | 13 +++++++++---- 1 file 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; } -- cgit v1.2.3-24-ge0c7