Skip to content
Browse files

11.dev.t: Get device name via driver_id=>$perlcdio::DRIVER_DEVICE sin…

…ce Device::Cdio::get_devices is borked. Thanks again to Jerry G Geiger for the investigation and suggestion.
  • Loading branch information...
1 parent 25cbc79 commit a83f8ee29d9796a5106307dfa7411bad00654744 R. Bernstein committed Aug 14, 2011
Showing with 4 additions and 7 deletions.
  1. +4 −7 t/11.dev.t
View
11 t/11.dev.t
@@ -18,19 +18,16 @@ my $device = '/dev/cdrom';
note 'Test running audio device operations';
-my $dev = Device::Cdio::Device->new($device);
-ok ( defined $dev , 'Device::Cdio::Device->new()');
+my $dev = Device::Cdio::Device->new(-driver_id=>$perlcdio::DRIVER_DEVICE);
+ok ( defined $dev , 'Device::Cdio::Device->new(-driver_id=>$perlcdio::DRIVER_DEVICE)');
+my $drive_name = $dev->get_device();
+note('Device->new(DRIVER_DEVICE)((i.e.:',$perlcdio::DRIVER_DEVICE,')) found: ',$drive_name);
#my @drives = Device::Cdio::get_devices_with_cap(
# -capabilities => $perlcdio::FS_AUDIO,
# -any=>0);
my @drives = Device::Cdio::get_devices($perlcdio::DRIVER_DEVICE);
SKIP : {
- skip 'no devices found', 1, unless scalar @drives;
- ok ( scalar @drives , 'Device::Cdio::get_devices');
- diag explain @drives;
- # $device = $drives[0]; ??
-
my @hwinfo = $dev->get_hwinfo;
ok ( $hwinfo[3] , 'Device::Cdio::Device->get_hwinfo');
note("Testing ", $device, ' ', $hwinfo[0],' ',$hwinfo[1]);

0 comments on commit a83f8ee

Please sign in to comment.
Something went wrong with that request. Please try again.