[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.2, Mon Feb 5 19:39:33 2007 UTC (17 years, 5 months ago) by andrew
Branch: MAIN
Changes since 1.1: +14 -11 lines

Actually read in the file the same way.

#!perl -T
# $RedRiver: 10-network-ap.t,v 1.1 2007/02/05 19:21:02 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', 'do_network.tests');

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{PASSWD};

    ok( sub { return 1 } );
}