tests -> test
All public includes are included via #include <cdio/....h> rather than #include "....h" (removed -I $top_srcdir/include/cdio)
This commit is contained in:
7
test/.cvsignore
Normal file
7
test/.cvsignore
Normal file
@@ -0,0 +1,7 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
check_cue.sh
|
||||
*.dump
|
||||
*.cue
|
||||
*.bin
|
||||
*.nrg
|
||||
38
test/Makefile.am
Normal file
38
test/Makefile.am
Normal file
@@ -0,0 +1,38 @@
|
||||
# $Id: Makefile.am,v 1.1 2003/04/22 12:09:09 rocky Exp $
|
||||
#
|
||||
# Copyright (C) 2003 Rocky Bernstein <rocky@panix.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
####################################################
|
||||
# Things to regression testing
|
||||
####################################################
|
||||
#
|
||||
check_SCRIPTS = check_nrg.sh check_cue.sh check_opts.sh
|
||||
|
||||
check_DATA = vcd_demo.right \
|
||||
cdda.right cdda.cue cdda.bin \
|
||||
isofs-m1.right isofs-m1.cue isofs-m1.bin \
|
||||
check_opts0.right check_opts1.right check_opts2.right \
|
||||
check_opts3.right check_opts4.right check_opts5.right \
|
||||
check_opts6.right check_opts7.right
|
||||
|
||||
EXTRA_DIST = $(check_SCRIPTS) $(check_DATA) \
|
||||
check_common_fn check_cue.sh.in
|
||||
|
||||
TESTS_ENVIRONMENT=$(SHELL)
|
||||
TESTS = $(check_SCRIPTS)
|
||||
|
||||
MOSTLYCLEANFILES = core.* *.dump
|
||||
12
test/cdda.right
Normal file
12
test/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
|
||||
71
test/check_common_fn
Executable file
71
test/check_common_fn
Executable file
@@ -0,0 +1,71 @@
|
||||
# $Id: check_common_fn,v 1.1 2003/04/22 12:09:09 rocky Exp $
|
||||
SKIP_TEST_EXITCODE=77
|
||||
|
||||
have_cmp() {
|
||||
if cmp /dev/null /dev/null > /dev/null 2>&1; then
|
||||
:
|
||||
else
|
||||
|
||||
return 1;
|
||||
fi
|
||||
|
||||
if cmp /dev/zero /dev/null > /dev/null 2>&1; then
|
||||
return 1;
|
||||
fi
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
check_result() {
|
||||
RC=$1
|
||||
shift
|
||||
msg=$*
|
||||
if test $RC -ne 0 ; then
|
||||
if test $RC -ne $SKIP_TEST_EXITCODE ; then
|
||||
echo "$0: $msg failed."
|
||||
exit $RC
|
||||
else
|
||||
echo "$0: $msg skipped."
|
||||
fi
|
||||
else
|
||||
echo "$0: $msg ok."
|
||||
fi
|
||||
}
|
||||
|
||||
test_cdinfo() {
|
||||
|
||||
opts="$1"
|
||||
outfile="$2"
|
||||
rightfile="$3"
|
||||
|
||||
CDINFO="../src/cdinfo"
|
||||
|
||||
if [ ! -x ${CDINFO} ]; then
|
||||
echo "$0: No cdinfo"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if ${CDINFO} ${opts} >${outfile} 2>&1 ; then
|
||||
if have_cmp; then
|
||||
if cmp ${outfile} ${rightfile} ; then
|
||||
rm -f $outfile
|
||||
return 0
|
||||
else
|
||||
return 3
|
||||
fi
|
||||
else
|
||||
echo "$0: No cmp(1) found - cannot test cdinfo"
|
||||
rm -f $outfile
|
||||
return 77
|
||||
fi
|
||||
else
|
||||
echo "$0: ${CDINFO} ${opts} failed"
|
||||
return 2
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
#;;; Local Variables: ***
|
||||
#;;; mode:shell-script ***
|
||||
#;;; eval: (sh-set-shell "bash") ***
|
||||
#;;; End: ***
|
||||
60
test/check_cue.sh.in
Normal file
60
test/check_cue.sh.in
Normal file
@@ -0,0 +1,60 @@
|
||||
#!/bin/sh
|
||||
#$Id: check_cue.sh.in,v 1.1 2003/04/22 12:09:09 rocky Exp $
|
||||
if test -n "@CDDB_LIB@" ; then
|
||||
cddb_opt='--no-cddb'
|
||||
fi
|
||||
|
||||
if test -z $srcdir ; then
|
||||
srcdir=`pwd`
|
||||
fi
|
||||
|
||||
. ${srcdir}/check_common_fn
|
||||
|
||||
BASE=`basename $0 .sh`
|
||||
|
||||
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"
|
||||
|
||||
fname=isofs-m1
|
||||
testnum='ISO 9660 mode1'
|
||||
if test -f ${srcdir}/${fname}.bin ; then
|
||||
test_cdinfo "--cue-file ${srcdir}/${fname}.cue" \
|
||||
${fname}.dump ${srcdir}/${fname}.right
|
||||
RC=$?
|
||||
check_result $RC "cdinfo CUE test $testnum"
|
||||
else
|
||||
echo "Don't see CUE file ${srcdir}/${fname}.bin. Test $testum skipped."
|
||||
fi
|
||||
|
||||
fname=vcd_demo
|
||||
testnum='Video CD'
|
||||
if test -f ${srcdir}/${fname}.cue ; then
|
||||
test_cdinfo "-c ${srcdir}/vcd_demo.cue" \
|
||||
${fname}.dump ${srcdir}/${fname}.right
|
||||
RC=$?
|
||||
check_result $RC "cdinfo CUE test $testnum"
|
||||
else
|
||||
echo "Don't see CUE file ${srcdir}/${fname}.cue. Test $testum skipped."
|
||||
fi
|
||||
|
||||
fname=svcd_ogt_test_ntsc
|
||||
testnum='Super Video CD'
|
||||
if test -f ${srcdir}/${fname}.bin ; then
|
||||
test_cdinfo "--cue-file ${srcdir}/${fname}.cue" \
|
||||
${fname}.dump ${srcdir}/${fname}.right
|
||||
RC=$?
|
||||
check_result $RC "cdinfo CUE test $testnum"
|
||||
else
|
||||
echo "Don't see CUE file ${srcdir}/${fname}.bin. Test $testnum skipped."
|
||||
fi
|
||||
|
||||
exit $RC
|
||||
|
||||
#;;; Local Variables: ***
|
||||
#;;; mode:shell-script ***
|
||||
#;;; eval: (sh-set-shell "bash") ***
|
||||
#;;; End: ***
|
||||
39
test/check_nrg.sh
Executable file
39
test/check_nrg.sh
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
#$Id: check_nrg.sh,v 1.1 2003/04/22 12:09:09 rocky Exp $
|
||||
|
||||
if test -z $srcdir ; then
|
||||
srcdir=`pwd`
|
||||
fi
|
||||
|
||||
. ${srcdir}/check_common_fn
|
||||
|
||||
BASE=`basename $0 .sh`
|
||||
nrg_file=${srcdir}/monvoisin.nrg
|
||||
|
||||
if test -f $nrg_file ; then
|
||||
test_cdinfo "--nrg-file $nrg_file" \
|
||||
monvoisin.dump ${srcdir}/monvoisin.right
|
||||
RC=$?
|
||||
check_result $RC 'cdinfo NRG test 1'
|
||||
else
|
||||
echo "Don't see NRG file ${nrg_file}. Test skipped."
|
||||
exit $SKIP_TEST_EXITCODE
|
||||
fi
|
||||
|
||||
nrg_file=${srcdir}/svcdgs.nrg
|
||||
if test -f $nrg_file ; then
|
||||
test_cdinfo "--nrg-file $nrg_file" \
|
||||
svcdgs.dump ${srcdir}/svcdgs.right
|
||||
RC=$?
|
||||
check_result $RC 'cdinfo NRG test 2'
|
||||
|
||||
exit $RC
|
||||
else
|
||||
echo "Don't see NRG file ${nrg_file}. Test skipped."
|
||||
exit $SKIP_TEST_EXITCODE
|
||||
fi
|
||||
|
||||
#;;; Local Variables: ***
|
||||
#;;; mode:shell-script ***
|
||||
#;;; eval: (sh-set-shell "bash") ***
|
||||
#;;; End: ***
|
||||
29
test/check_opts.sh
Executable file
29
test/check_opts.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
#$Id: check_opts.sh,v 1.1 2003/04/22 12:09:09 rocky Exp $
|
||||
# Check cdinfo options
|
||||
if test -z "$srcdir" ; then
|
||||
srcdir=`pwd`
|
||||
fi
|
||||
|
||||
. ${srcdir}/check_common_fn
|
||||
|
||||
BASE=`basename $0 .sh`
|
||||
|
||||
fname=isofs-m1
|
||||
i=0
|
||||
for opt in '-T' '--no-tracks' '-A' '--no-analyze' '-I' '-no-ioctl' \
|
||||
'-q' '--quiet' ; do
|
||||
testname=${BASE}$i
|
||||
test_cdinfo "--cue-file ${srcdir}/${fname}.cue $opt" \
|
||||
${testname}.dump ${srcdir}/${testname}.right
|
||||
RC=$?
|
||||
check_result $RC "cdinfo option test $opt"
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
|
||||
exit $RC
|
||||
|
||||
#;;; Local Variables: ***
|
||||
#;;; mode:shell-script ***
|
||||
#;;; eval: (sh-set-shell "bash") ***
|
||||
#;;; End: ***
|
||||
8
test/check_opts0.right
Normal file
8
test/check_opts0.right
Normal file
@@ -0,0 +1,8 @@
|
||||
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.
|
||||
__________________________________
|
||||
try to find out what sort of CD this is
|
||||
CD-ROM with ISO 9660 filesystem
|
||||
ISO 9660: 64 blocks, label `CDROM '
|
||||
8
test/check_opts1.right
Normal file
8
test/check_opts1.right
Normal file
@@ -0,0 +1,8 @@
|
||||
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.
|
||||
__________________________________
|
||||
try to find out what sort of CD this is
|
||||
CD-ROM with ISO 9660 filesystem
|
||||
ISO 9660: 64 blocks, label `CDROM '
|
||||
9
test/check_opts2.right
Normal file
9
test/check_opts2.right
Normal file
@@ -0,0 +1,9 @@
|
||||
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 data
|
||||
170: 00:06:02 000302 leadout
|
||||
9
test/check_opts3.right
Normal file
9
test/check_opts3.right
Normal file
@@ -0,0 +1,9 @@
|
||||
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 data
|
||||
170: 00:06:02 000302 leadout
|
||||
13
test/check_opts4.right
Normal file
13
test/check_opts4.right
Normal file
@@ -0,0 +1,13 @@
|
||||
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 data
|
||||
170: 00:06:02 000302 leadout
|
||||
__________________________________
|
||||
try to find out what sort of CD this is
|
||||
CD-ROM with ISO 9660 filesystem
|
||||
ISO 9660: 64 blocks, label `CDROM '
|
||||
13
test/check_opts5.right
Normal file
13
test/check_opts5.right
Normal file
@@ -0,0 +1,13 @@
|
||||
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 data
|
||||
170: 00:06:02 000302 leadout
|
||||
__________________________________
|
||||
try to find out what sort of CD this is
|
||||
CD-ROM with ISO 9660 filesystem
|
||||
ISO 9660: 64 blocks, label `CDROM '
|
||||
13
test/check_opts6.right
Normal file
13
test/check_opts6.right
Normal file
@@ -0,0 +1,13 @@
|
||||
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 data
|
||||
170: 00:06:02 000302 leadout
|
||||
__________________________________
|
||||
try to find out what sort of CD this is
|
||||
CD-ROM with ISO 9660 filesystem
|
||||
ISO 9660: 64 blocks, label `CDROM '
|
||||
13
test/check_opts7.right
Normal file
13
test/check_opts7.right
Normal file
@@ -0,0 +1,13 @@
|
||||
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 data
|
||||
170: 00:06:02 000302 leadout
|
||||
__________________________________
|
||||
try to find out what sort of CD this is
|
||||
CD-ROM with ISO 9660 filesystem
|
||||
ISO 9660: 64 blocks, label `CDROM '
|
||||
12
test/fsf.right
Normal file
12
test/fsf.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: 01:50:20 008120 leadout
|
||||
__________________________________
|
||||
try to find out what sort of CD this is
|
||||
Audio CD, CDDB disc ID is 02006c01
|
||||
13
test/isofs-m1.right
Normal file
13
test/isofs-m1.right
Normal file
@@ -0,0 +1,13 @@
|
||||
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 data
|
||||
170: 00:06:02 000302 leadout
|
||||
__________________________________
|
||||
try to find out what sort of CD this is
|
||||
CD-ROM with ISO 9660 filesystem
|
||||
ISO 9660: 64 blocks, label `CDROM '
|
||||
17
test/monvoisin.right
Normal file
17
test/monvoisin.right
Normal file
@@ -0,0 +1,17 @@
|
||||
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 - 2)
|
||||
#: MSF LSN Type
|
||||
1: 00:02:00 000000 XA
|
||||
2: 00:18:51 001251 XA
|
||||
170: 00:39:71 002846 leadout
|
||||
__________________________________
|
||||
try to find out what sort of CD this is
|
||||
CD-ROM with CD-RTOS and ISO 9660 filesystem
|
||||
ISO 9660: 1101 blocks, label `MONVOISIN '
|
||||
XA sectors Video CD
|
||||
session #2 starts at track 2, LSN: 1251, ISO 9660 blocks: 1101
|
||||
ISO 9660: 1101 blocks, label `<60><>)*<2A>c]<5D>d<1C><>q^\MvKM<4B><4D>b<EFBFBD><18><>Ǎ<10>%<25>'
|
||||
17
test/svcd_ogt_test_ntsc.right
Normal file
17
test/svcd_ogt_test_ntsc.right
Normal file
@@ -0,0 +1,17 @@
|
||||
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 - 2)
|
||||
#: MSF LSN Type
|
||||
1: 00:02:00 000000 XA
|
||||
2: 00:09:01 000526 XA
|
||||
170: 00:56:56 004106 leadout
|
||||
__________________________________
|
||||
try to find out what sort of CD this is
|
||||
CD-ROM with CD-RTOS and ISO 9660 filesystem
|
||||
ISO 9660: 376 blocks, label `SVCD_OGT_TEST_NTSC '
|
||||
XA sectors
|
||||
session #2 starts at track 2, LSN: 526, ISO 9660 blocks: 376
|
||||
ISO 9660: 376 blocks, label `DD3#3"C"$<24>@'
|
||||
15
test/svcdgs.right
Normal file
15
test/svcdgs.right
Normal file
@@ -0,0 +1,15 @@
|
||||
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 - 2)
|
||||
#: MSF LSN Type
|
||||
1: 00:02:00 000000 XA
|
||||
2: 00:22:53 001553 XA
|
||||
170: 00:29:42 002067 leadout
|
||||
__________________________________
|
||||
try to find out what sort of CD this is
|
||||
CD-ROM with ISO 9660 filesystem
|
||||
ISO 9660: 6610 blocks, label `SVCD '
|
||||
XA sectors Chaoji Video CD
|
||||
18
test/vcd_demo.right
Normal file
18
test/vcd_demo.right
Normal file
@@ -0,0 +1,18 @@
|
||||
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 - 3)
|
||||
#: MSF LSN Type
|
||||
1: 00:02:00 000000 XA
|
||||
2: 00:17:57 001182 XA
|
||||
3: 00:24:71 001721 XA
|
||||
170: 00:30:10 002110 leadout
|
||||
__________________________________
|
||||
try to find out what sort of CD this is
|
||||
CD-ROM with CD-RTOS and ISO 9660 filesystem
|
||||
ISO 9660: 1032 blocks, label `V0469 '
|
||||
XA sectors Video CD
|
||||
session #2 starts at track 2, LSN: 1182, ISO 9660 blocks: 1032
|
||||
ISO 9660: 1032 blocks, label `'
|
||||
Reference in New Issue
Block a user