Wasn't checking the range of the device id in cdio_have_driver. Add regression test for checking this too.

More git administrivia.
This commit is contained in:
R. Bernstein
2008-12-06 21:20:51 -05:00
parent f434186567
commit 542481d673
7 changed files with 141 additions and 5 deletions

View File

@@ -80,6 +80,13 @@ main(int argc, const char *argv[])
cdio_log_set_handler (log_handler);
if (cdio_have_driver(-1) != false)
{
printf("Bogus driver number -1 should be regexted\n");
return 5;
}
if (! (cdio_have_driver(DRIVER_NRG) && cdio_have_driver(DRIVER_BINCUE)) ) {
printf("You don't have enough drivers for this test\n");
exit(77);
@@ -189,12 +196,8 @@ main(int argc, const char *argv[])
}
cdio_free_device_list(nrg_images);
free(nrg_images);
cdio_free_device_list(bincue_images);
free(bincue_images);
cdio_free_device_list(imgs);
free(imgs);
return 0;
}