Add regression test to check cdinfo options processing.

This commit is contained in:
rocky
2003-04-14 08:51:14 +00:00
parent 2c0de703f7
commit 0bddc2a05e
11 changed files with 114 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
# $Id: Makefile.am,v 1.3 2003/04/06 08:13:25 rocky Exp $ # $Id: Makefile.am,v 1.4 2003/04/14 08:51:14 rocky Exp $
# #
# Copyright (C) 2003 Rocky Bernstein <rocky@panix.com> # Copyright (C) 2003 Rocky Bernstein <rocky@panix.com>
# #
@@ -20,7 +20,7 @@
# Things to regression testing # Things to regression testing
#################################################### ####################################################
# #
check_SCRIPTS = check_nrg.sh check_cue.sh check_SCRIPTS = check_nrg.sh check_cue.sh check_opts.sh
check_DATA = monvoisin.right svcd_ogt_test_ntsc.right vcd_demo.right \ check_DATA = monvoisin.right svcd_ogt_test_ntsc.right vcd_demo.right \
fsf-tompox.right fsf-tompox.cue fsf-tompox.bin monvoisin.nrg \ fsf-tompox.right fsf-tompox.cue fsf-tompox.bin monvoisin.nrg \

View File

@@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
#$Id: check_cue.sh,v 1.3 2003/04/14 04:28:40 rocky Exp $ #$Id: check_cue.sh,v 1.4 2003/04/14 08:51:14 rocky Exp $
if test -z $srcdir ; then if test -z $srcdir ; then
srcdir=`pwd` srcdir=`pwd`
@@ -10,7 +10,7 @@ fi
BASE=`basename $0 .sh` BASE=`basename $0 .sh`
fname=fsf fname=fsf
test_cdinfo "--cue-file ${srcdir}/${fname}.cue --nocddb" \ test_cdinfo "--cue-file ${srcdir}/${fname}.cue --no-cddb" \
${fname}.dump ${srcdir}/${fname}.right ${fname}.dump ${srcdir}/${fname}.right
RC=$? RC=$?
check_result $RC 'cdinfo CUE test 1' check_result $RC 'cdinfo CUE test 1'

30
tests/check_opts.sh Executable file
View File

@@ -0,0 +1,30 @@
#!/bin/sh
#$Id: check_opts.sh,v 1.1 2003/04/14 08:51:14 rocky Exp $
# Check cdinfo options
if test -z $srcdir ; then
srcdir=`pwd`
fi
. ${srcdir}/check_common_fn
BASE=`basename $0 .sh`
fname=fsf
opts=('-T' '--no-tracks' '-A', '--no-analyze' '-I' '-no-ioctl'
'-q' '--quiet')
for (( i=0 ; i<${#opts[@]} ; i++ )) ; do
testname=${BASE}$i
test_cdinfo "--cue-file ${srcdir}/${fname}.cue --no-cddb ${opts[$i]}" \
${testname}.dump ${srcdir}/${testname}.right
RC=$?
check_result $RC "cdinfo option test $i"
done
exit $RC
#;;; Local Variables: ***
#;;; mode:shell-script ***
#;;; eval: (sh-set-shell "bash") ***
#;;; End: ***

7
tests/check_opts0.right Normal file
View File

@@ -0,0 +1,7 @@
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
Audio CD, CDDB disc ID is 02006c01

7
tests/check_opts1.right Normal file
View File

@@ -0,0 +1,7 @@
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
Audio CD, CDDB disc ID is 02006c01

9
tests/check_opts2.right Normal file
View 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 audio
170: 01:50:20 008120 leadout

9
tests/check_opts3.right Normal file
View 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 audio
170: 01:50:20 008120 leadout

12
tests/check_opts4.right Normal file
View 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

12
tests/check_opts5.right Normal file
View 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

12
tests/check_opts6.right Normal file
View 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

12
tests/check_opts7.right Normal file
View 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