Add small cdda test.
cdio.c: cdio_open was opening image drivers.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# $Id: Makefile.am,v 1.3 2003/04/19 19:12:06 rocky Exp $
|
||||
# $Id: Makefile.am,v 1.4 2003/04/20 15:34:31 rocky Exp $
|
||||
#
|
||||
# Copyright (C) 2003 Rocky Bernstein <rocky@panix.com>
|
||||
#
|
||||
@@ -30,7 +30,8 @@ DISTFILES_REGRESSION = tests/monvoisin.nrg tests/monvoisin.right \
|
||||
tests/svcd_ogt_test_ntsc.bin \
|
||||
tests/svcd_ogt_test_ntsc.cue \
|
||||
tests/svcd_ogt_test_ntsc.right \
|
||||
tests/fsf.bin tests/fsf.cue tests/fsf.right
|
||||
tests/vcd_demo.bin tests/vcd_demo.cue \
|
||||
tests/vcd_demo.right
|
||||
|
||||
REGRESSION_VERSION = 1.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
AC_REVISION([$Id: configure.ac,v 1.12 2003/04/20 01:39:23 rocky Exp $])dnl
|
||||
AC_REVISION([$Id: configure.ac,v 1.13 2003/04/20 15:34:31 rocky Exp $])dnl
|
||||
AC_INIT(lib/cdio.c)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_INIT_AUTOMAKE(libcdio, 0.3)
|
||||
@@ -209,7 +209,10 @@ fi
|
||||
|
||||
AC_SUBST(CDDB_LIB)
|
||||
|
||||
AC_CONFIG_COMMANDS([check-opts], [chmod +x tests/check_opts.sh])
|
||||
AC_CONFIG_COMMANDS([checks],
|
||||
[chmod +x tests/check_opts.sh;
|
||||
chmod +x tests/check_cue.sh;
|
||||
])
|
||||
|
||||
AC_OUTPUT([ \
|
||||
Makefile \
|
||||
@@ -219,6 +222,7 @@ AC_OUTPUT([ \
|
||||
lib/Makefile \
|
||||
src/Makefile \
|
||||
tests/check_opts.sh \
|
||||
tests/check_cue.sh \
|
||||
tests/Makefile \
|
||||
])
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: cdio.c,v 1.9 2003/04/14 04:24:47 rocky Exp $
|
||||
$Id: cdio.c,v 1.10 2003/04/20 15:34:31 rocky Exp $
|
||||
|
||||
Copyright (C) 2003 Rocky Bernstein <rocky@panix.com>
|
||||
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "logging.h"
|
||||
#include "cdio_private.h"
|
||||
|
||||
static const char _rcsid[] = "$Id: cdio.c,v 1.9 2003/04/14 04:24:47 rocky Exp $";
|
||||
static const char _rcsid[] = "$Id: cdio.c,v 1.10 2003/04/20 15:34:31 rocky Exp $";
|
||||
|
||||
|
||||
const char *track_format2str[5] =
|
||||
@@ -569,7 +569,7 @@ cdio_open (const char *orig_source_name, driver_id_t driver_id)
|
||||
case DRIVER_DEVICE:
|
||||
{
|
||||
/* Scan for a driver. */
|
||||
CdIo *ret = scan_for_driver(DRIVER_UNKNOWN, MAX_DRIVER, source_name);
|
||||
CdIo *ret = cdio_open_cd(source_name);
|
||||
free(source_name);
|
||||
return ret;
|
||||
}
|
||||
@@ -606,7 +606,7 @@ cdio_open_cd (const char *source_name)
|
||||
if (CdIo_last_driver == -1) cdio_init();
|
||||
|
||||
/* Scan for a driver. */
|
||||
return scan_for_driver(DRIVER_UNKNOWN, MAX_DRIVER, source_name);
|
||||
return scan_for_driver(MIN_DEVICE_DRIVER, MAX_DEVICE_DRIVER, source_name);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: Makefile.am,v 1.7 2003/04/19 19:12:06 rocky Exp $
|
||||
# $Id: Makefile.am,v 1.8 2003/04/20 15:34:31 rocky Exp $
|
||||
#
|
||||
# Copyright (C) 2003 Rocky Bernstein <rocky@panix.com>
|
||||
#
|
||||
@@ -23,6 +23,7 @@
|
||||
check_SCRIPTS = check_nrg.sh check_cue.sh check_opts.sh
|
||||
|
||||
check_DATA = vcd_demo.right \
|
||||
cdda.right cdda.cue cdda.bin \
|
||||
fsf-tompox.right fsf-tompox.cue fsf-tompox.bin \
|
||||
check_opts0.right check_opts1.right check_opts2.right \
|
||||
check_opts3.right check_opts4.right check_opts5.right \
|
||||
|
||||
BIN
tests/cdda.bin
Normal file
BIN
tests/cdda.bin
Normal file
Binary file not shown.
3
tests/cdda.cue
Normal file
3
tests/cdda.cue
Normal file
@@ -0,0 +1,3 @@
|
||||
FILE "BOING.BIN" BINARY
|
||||
TRACK 01 AUDIO
|
||||
INDEX 01 00:00:00
|
||||
12
tests/cdda.right
Normal file
12
tests/cdda.right
Normal file
@@ -0,0 +1,12 @@
|
||||
CD Info 2.0 | (c) 2003 Gerd Knorr, Heiko Ei<45>feldt & R. Bernstein
|
||||
This is free software; see the source for copying conditions.
|
||||
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
|
||||
PARTICULAR PURPOSE.
|
||||
__________________________________
|
||||
CD-ROM Track List (1 - 1)
|
||||
#: MSF LSN Type
|
||||
1: 00:02:00 000000 audio
|
||||
170: 00:06:02 000302 leadout
|
||||
__________________________________
|
||||
try to find out what sort of CD this is
|
||||
Audio CD, CDDB disc ID is 02000401
|
||||
@@ -1,5 +1,8 @@
|
||||
#!/bin/sh
|
||||
#$Id: check_cue.sh,v 1.5 2003/04/19 19:12:06 rocky Exp $
|
||||
#$Id: check_cue.sh,v 1.6 2003/04/20 15:34:31 rocky Exp $
|
||||
if test -n "-lcddb" ; then
|
||||
cddb_opt='--no-cddb'
|
||||
fi
|
||||
|
||||
if test -z $srcdir ; then
|
||||
srcdir=`pwd`
|
||||
@@ -9,9 +12,9 @@ fi
|
||||
|
||||
BASE=`basename $0 .sh`
|
||||
|
||||
fname=fsf-tompox
|
||||
testnum=1
|
||||
test_cdinfo "--cue-file ${srcdir}/${fname}.cue" \
|
||||
fname=cdda
|
||||
testnum=CD-DA
|
||||
test_cdinfo "--cue-file ${srcdir}/${fname}.cue $cddb_opt" \
|
||||
${fname}.dump ${srcdir}/${fname}.right
|
||||
RC=$?
|
||||
check_result $RC "cdinfo CUE test $testnum"
|
||||
|
||||
Reference in New Issue
Block a user