File: 05.ops.t

package info (click to toggle)
libdevice-cdio-perl 0.3.0-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,248 kB
  • ctags: 2,564
  • sloc: ansic: 11,536; perl: 4,027; makefile: 69; sh: 3
file content (33 lines) | stat: -rwxr-xr-x 935 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/env perl
# Test running miscellaneous operations
# No assumption about the CD-ROM drives is made, so
# we're just going to run operations and see that they
# don't crash.

use strict;
use warnings;
use lib '../lib';
use blib;

use Device::Cdio;
use Device::Cdio::Device;
use Test::More tests => 6;
note 'Test running miscellaneous operations';

SKIP: {
skip "No device '/dev/cdrom' found", 6 unless -e "/dev/cdrom";

my @drives = Device::Cdio::get_devices();
ok ( 1 , 'Device::Cdio::get_devices');
@drives = Device::Cdio::get_devices_with_cap($perlcdio::FS_MATCH_ALL);
ok ( 1 , 'Device::Cdio::get_devices_with_cap(perlcdio::FS_MATCH_ALL)');
my $dev = Device::Cdio::Device->new();
ok ( 1 , 'Device::Cdio::Device->new()');
$dev->open();
ok ( 1 , 'Device::Cdio::Device::open');
$dev->have_ATAPI();
ok ( 1 , 'Device::Cdio::Device::have_ATAPI');
$dev->get_media_changed();
ok ( 1 , 'Device::Cdio::Device::get_media_changed');

}