File: 10-use.t

package info (click to toggle)
libnet-appliance-session-perl 4.300005-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 188 kB
  • sloc: perl: 1,048; makefile: 11
file content (38 lines) | stat: -rw-r--r-- 695 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/perl -w
use strict;
use Test::More 0.88;

BEGIN { use_ok('Net::Appliance::Session') }

my $s = new_ok('Net::Appliance::Session' => [{
        transport => 'Serial',
        personality => 'cisco',
    }], 'new instance' );

foreach (qw(
    logged_in
    in_privileged_mode
    in_configure_mode
    do_paging
    do_login
    do_privileged_mode
    do_configure_mode
    get_username
    get_password
    set_username
    set_password
    pager_disable_lines
    pager_enable_lines
    connect
    close
    enable_paging
    disable_paging
    begin_privileged
    end_privileged
    begin_configure
    end_configure
)) {
    ok( $s->can($_), "can do method $_");
}

done_testing;