summaryrefslogtreecommitdiff
path: root/cpan/libnet/t/smtp.t
diff options
context:
space:
mode:
Diffstat (limited to 'cpan/libnet/t/smtp.t')
-rw-r--r--cpan/libnet/t/smtp.t38
1 files changed, 38 insertions, 0 deletions
diff --git a/cpan/libnet/t/smtp.t b/cpan/libnet/t/smtp.t
new file mode 100644
index 0000000000..ac2df6c8b9
--- /dev/null
+++ b/cpan/libnet/t/smtp.t
@@ -0,0 +1,38 @@
+#!./perl -w
+
+BEGIN {
+ unless (-d 'blib') {
+ 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;
+ }
+}
+
+use Net::Config;
+use Net::SMTP;
+
+unless(@{$NetConfig{smtp_hosts}} && $NetConfig{test_hosts}) {
+ print "1..0\n";
+ exit 0;
+}
+
+print "1..3\n";
+
+my $i = 1;
+
+$smtp = Net::SMTP->new(Debug => 0)
+ or (print("not ok 1\n"), exit);
+
+print "ok 1\n";
+
+$smtp->domain or print "not ";
+print "ok 2\n";
+
+$smtp->quit or print "not ";
+print "ok 3\n";
+