File: 08-get_busses.t

package info (click to toggle)
libdevice-usb-perl 0.38-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 408 kB
  • sloc: perl: 1,819; makefile: 11
file content (29 lines) | stat: -rw-r--r-- 586 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
#!perl -T

use Test::More qw(no_plan); ## no critic(ProhibitNoPlan)
use Device::USB;
use strict;
use warnings;

#
# No plan, because the number of tests depends on the number of
#  busses and devices on the system.
#

my $usb = Device::USB->new();

ok( defined $usb, "Object successfully created" );
can_ok( $usb, "get_busses" );

$usb->find_busses();
$usb->find_devices();

my $busses = $usb->get_busses();
ok( defined $busses, "USB busses found" );

isa_ok( $busses, "ARRAY", "An array of busses returned." );

foreach my $bus (@{$busses})
{
    isa_ok( $bus, "Device::USB::Bus" );
}