[BACK]Return to 50-network.t-stub CVS log [TXT][DIR] Up to [local] / trango / Net-Telnet-Trango / t

File: [local] / trango / Net-Telnet-Trango / t / 50-network.t-stub (download)

Revision 1.1, Mon Feb 5 19:21:02 2007 UTC (17 years, 5 months ago) by andrew
Branch: MAIN

add a stub for network testing, and prompt for the username and password when running Build.PL

#!perl -T
# $RedRiver$

use Test::More tests => 2;

BEGIN {
	use_ok( 'Net::Telnet::Trango' );
}

diag( "Testing Net::Telnet::Trango $Net::Telnet::Trango::VERSION, Perl $], $^X" );

my %cfg;
if (-e 'do_network.tests') {
    if (open my $fh, 'do_network.tests') {
        while (<$fh>) {
            chomp;
            my ($key, $value) = split /\t/, $_, 2;
            $cfg{$key} = $value;
        }
        close $fh;
    }
}

SKIP: {
    skip 'No AP or Password in config file', 1
        unless $cfg{AP} && $cfg{PASSWD};

    ok( sub { return 1 } );
}