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

Annotation of trango/Net-Telnet-Trango/t/50-network.t-stub, Revision 1.3

1.1       andrew      1: #!perl -T
1.3     ! andrew      2: # $RedRiver: 50-network.t,v 1.2 2007/02/05 19:39:33 andrew Exp $
1.1       andrew      3:
                      4: use Test::More tests => 2;
1.2       andrew      5: use File::Spec;
1.1       andrew      6:
                      7: BEGIN {
                      8:        use_ok( 'Net::Telnet::Trango' );
                      9: }
                     10:
                     11: diag( "Testing Net::Telnet::Trango $Net::Telnet::Trango::VERSION, Perl $], $^X" );
                     12:
1.3     ! andrew     13: my $cfg_file = File::Spec->catfile('t', 'tests.cfg');
1.2       andrew     14:
                     15: SKIP: {
                     16:     my %cfg;
                     17:     if (-e $cfg_file) {
                     18:         if (open my $fh, $cfg_file) {
                     19:             while (<$fh>) {
                     20:                 chomp;
                     21:                 my ($key, $value) = split /\t/, $_, 2;
                     22:                 $cfg{$key} = $value;
                     23:             }
                     24:             close $fh;
1.1       andrew     25:         }
                     26:     }
                     27:
                     28:     skip 'No AP or Password in config file', 1
1.3     ! andrew     29:         unless $cfg{AP} && $cfg{AP_PASSWD};
1.1       andrew     30:
                     31:     ok( sub { return 1 } );
                     32: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>