[BACK]Return to 30-decode-sysname.t CVS log [TXT][DIR] Up to [local] / trango / Net-Telnet-Trango / t

Annotation of trango/Net-Telnet-Trango/t/30-decode-sysname.t, Revision 1.2

1.1       andrew      1: #!perl -T
1.2     ! andrew      2: # $RedRiver: 30-decode-sysname.t,v 1.1 2008/02/18 16:08:38 andrew Exp $
1.1       andrew      3:
1.2     ! andrew      4: use Test::More tests => 19;
1.1       andrew      5: use File::Spec;
                      6:
                      7: BEGIN {
1.2     ! andrew      8:     use_ok( 'Net::Telnet::Trango' );
1.1       andrew      9: }
                     10:
1.2     ! andrew     11: diag("30: Parse login banners");
1.1       andrew     12:
                     13: my @banners = (
1.2     ! andrew     14:     {
        !            15:         banner => 'Welcome to Trango Broadband Wireless, TrangoLINK-45 DFS PtP-P5055M 2p0r1D07070201',
        !            16:         host_type => 'TrangoLINK-45 DFS',
        !            17:         version   => 'DFS PtP-P5055M 2p0r1D07070201',
        !            18:     },
        !            19:     {
        !            20:         banner => 'Welcome to Trango Broadband Wireless M5830S AP 2p0r7H8002D07010207',
        !            21:         host_type => 'M5830S AP',
        !            22:         version   => 'AP 2p0r7H8002D07010207',
        !            23:     },
        !            24:     {
        !            25:         banner => 'Welcome to Trango Broadband Wireless M5800S-FSU 2p0r2H0004D05121201',
        !            26:         host_type => 'M5800S-FSU',
        !            27:         version   => 'FSU 2p0r2H0004D05121201',
        !            28:     },
        !            29:     {
        !            30:         banner => 'Welcome to Trango Broadband Wireless M5830S AP 2p0r7H8002D07010207',
        !            31:         host_type => 'M5830S AP',
        !            32:         version   => 'AP 2p0r7H8002D07010207',
        !            33:     },
        !            34:     {
        !            35:         banner => 'Welcome to Trango Broadband Wireless M5830S SU 2p0r7H0002D07010207',
        !            36:         host_type => 'M5830S SU',
        !            37:         version   => 'SU 2p0r7H0002D07010207',
        !            38:     },
        !            39:     {
        !            40:         banner => 'Welcome to Trango Broadband Wireless M5300S-FSU 2p0r2H0003D05121201',
        !            41:         host_type => 'M5300S-FSU',
        !            42:         version   => 'FSU 2p0r2H0003D05121201',
        !            43:     },
        !            44: );
1.1       andrew     45:
                     46: foreach my $banner (@banners) {
1.2     ! andrew     47:     my $decoded;
        !            48:     my $t = Net::Telnet::Trango->new();
        !            49:     ok($decoded = $t->parse_login_banner($banner->{banner}),
        !            50:         "Decoding linktest");
1.1       andrew     51:
1.2     ! andrew     52:     is($t->host_type(), $banner->{host_type}, "Host Type matches");
        !            53:     is($t->firmware_version(), $banner->{version}, "Firmware Version matches");
1.1       andrew     54: }
                     55:

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