From: Jarkko Hietaniemi Date: Mon, 3 Dec 2001 21:50:13 +0000 (+0000) Subject: If Socket has not been built (e.g. DJGPP) the libnet X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1a8dcddb2d9c2d67b4c434b6f8868331d0b0a36f;p=p5sagit%2Fp5-mst-13.2.git If Socket has not been built (e.g. DJGPP) the libnet tests fall over with (too) much noise. p4raw-id: //depot/perl@13443 --- diff --git a/lib/Net/t/config.t b/lib/Net/t/config.t index 560addb..41136ed 100644 --- a/lib/Net/t/config.t +++ b/lib/Net/t/config.t @@ -5,6 +5,9 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; } + if (!eval "require Socket") { + print "1..0 # no Socket\n"; exit 0; + } if (ord('A') == 193 && !eval "require Convert::EBCDIC") { print "1..0 # EBCDIC but no Convert::EBCDIC\n"; exit 0; } diff --git a/lib/Net/t/ftp.t b/lib/Net/t/ftp.t index be62458..32d750e 100644 --- a/lib/Net/t/ftp.t +++ b/lib/Net/t/ftp.t @@ -5,6 +5,9 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; } + if (!eval "require Socket") { + print "1..0 # no Socket\n"; exit 0; + } if (ord('A') == 193 && !eval "require Convert::EBCDIC") { print "1..0 # EBCDIC but no Convert::EBCDIC\n"; exit 0; } diff --git a/lib/Net/t/hostname.t b/lib/Net/t/hostname.t index 2569722..e085591 100644 --- a/lib/Net/t/hostname.t +++ b/lib/Net/t/hostname.t @@ -5,6 +5,9 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; } + if (!eval "require Socket") { + print "1..0 # no Socket\n"; exit 0; + } if (ord('A') == 193 && !eval "require Convert::EBCDIC") { print "1..0 # EBCDIC but no Convert::EBCDIC\n"; exit 0; } diff --git a/lib/Net/t/netrc.t b/lib/Net/t/netrc.t index e87388f..c7bbc04 100644 --- a/lib/Net/t/netrc.t +++ b/lib/Net/t/netrc.t @@ -5,6 +5,9 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; } + if (!eval "require Socket") { + print "1..0 # no Socket\n"; exit 0; + } if (ord('A') == 193 && !eval "require Convert::EBCDIC") { print "1..0 # EBCDIC but no Convert::EBCDIC\n"; exit 0; } diff --git a/lib/Net/t/nntp.t b/lib/Net/t/nntp.t index ffeb123..7fb99de 100644 --- a/lib/Net/t/nntp.t +++ b/lib/Net/t/nntp.t @@ -5,6 +5,9 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; } + if (!eval "require Socket") { + print "1..0 # no Socket\n"; exit 0; + } if (ord('A') == 193 && !eval "require Convert::EBCDIC") { print "1..0 # EBCDIC but no Convert::EBCDIC\n"; exit 0; } diff --git a/lib/Net/t/require.t b/lib/Net/t/require.t index 95dea87..163c8bd 100644 --- a/lib/Net/t/require.t +++ b/lib/Net/t/require.t @@ -5,6 +5,9 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; } + if (!eval "require Socket") { + print "1..0 # no Socket\n"; exit 0; + } if (ord('A') == 193 && !eval "require Convert::EBCDIC") { print "1..0 # EBCDIC but no Convert::EBCDIC\n"; exit 0; } diff --git a/lib/Net/t/smtp.t b/lib/Net/t/smtp.t index eb52f7c..ac2df6c 100644 --- a/lib/Net/t/smtp.t +++ b/lib/Net/t/smtp.t @@ -5,6 +5,9 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; } + if (!eval "require Socket") { + print "1..0 # no Socket\n"; exit 0; + } if (ord('A') == 193 && !eval "require Convert::EBCDIC") { print "1..0 # EBCDIC but no Convert::EBCDIC\n"; exit 0; } diff --git a/lib/Net/t/time.t b/lib/Net/t/time.t index fb169c2..a8d416e 100644 --- a/lib/Net/t/time.t +++ b/lib/Net/t/time.t @@ -5,6 +5,9 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; } + if (!eval "require Socket") { + print "1..0 # no Socket\n"; exit 0; + } if (ord('A') == 193 && !eval "require Convert::EBCDIC") { print "1..0 # EBCDIC but no Convert::EBCDIC\n"; exit 0; }