[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.3, Mon Feb 5 21:36:42 2007 UTC (17 years, 6 months ago) by andrew
Branch: MAIN
Changes since 1.2: +3 -3 lines

some Build.PL additions, and change the config file name.

#!perl -T
# $RedRiver: 50-network.t,v 1.2 2007/02/05 19:39:33 andrew Exp $

use Test::More tests => 2;
use File::Spec;

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

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

my $cfg_file = File::Spec->catfile('t', 'tests.cfg');

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

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

    ok( sub { return 1 } );
}