add cuesheet parser/validator tests

This commit is contained in:
Josh Coalson 2002-11-23 02:21:48 +00:00
parent abfd3568ae
commit cb908a6d77
51 changed files with 680 additions and 1 deletions

View File

@ -21,6 +21,8 @@ else
TESTS_ENVIRONMENT = FLAC__EXHAUSTIVE_TESTS=no
endif
SUBDIRS = cuesheets
if FLaC__HAS_OGG
OGG_TESTS = \
./test_libOggFLAC.sh \
@ -32,16 +34,19 @@ TESTS = \
./test_libFLAC++.sh \
$(OGG_TESTS) \
./test_metaflac.sh \
./test_grabbag.sh \
./test_streams.sh \
./test_bins.sh
EXTRA_DIST = \
Makefile.lite \
cuesheet.ok \
test_libFLAC.sh \
test_libFLAC++.sh \
test_libOggFLAC.sh \
test_libOggFLAC++.sh \
test_metaflac.sh \
test_grabbag.sh \
test_streams.sh \
test_bins.sh
@ -54,4 +59,5 @@ CLEANFILES = \
$(wildcard ../../test_files/bins/*.raw) \
$(wildcard ../../test_files/bins/*.flac) \
$(wildcard ../../test_files/bins/*.cmp) \
$(wildcard *.diff)
$(wildcard *.log)

View File

@ -27,6 +27,7 @@ all: clean
FLAC__EXHAUSTIVE_TESTS=yes ./test_libOggFLAC.sh
FLAC__EXHAUSTIVE_TESTS=yes ./test_libOggFLAC++.sh
FLAC__EXHAUSTIVE_TESTS=yes ./test_metaflac.sh
FLAC__EXHAUSTIVE_TESTS=yes ./test_grabbag.sh
FLAC__EXHAUSTIVE_TESTS=yes ./test_streams.sh
FLAC__EXHAUSTIVE_TESTS=yes ./test_bins.sh
@ -35,4 +36,4 @@ debug: all
release: all
clean:
rm -f *.raw *.flac *.ogg *.cmp *.wav ../../test_files/bins/*.raw ../../test_files/bins/*.flac ../../test_files/bins/*.cmp *.log core
rm -f *.raw *.flac *.ogg *.cmp *.wav ../../test_files/bins/*.raw ../../test_files/bins/*.flac ../../test_files/bins/*.cmp *.diff *.log core

90
test/cuesheet.ok Normal file
View File

@ -0,0 +1,90 @@
NEGATIVE cuesheets/bad.000.CATALOG_multiple.cue
pass1: parse error, line 2: "found multiple CATALOG commands"
NEGATIVE cuesheets/bad.001.CATALOG_missing_number.cue
pass1: parse error, line 1: "CATALOG is missing catalog number"
NEGATIVE cuesheets/bad.002.CATALOG_number_too_long.cue
pass1: parse error, line 1: "CATALOG number is too long"
NEGATIVE cuesheets/bad.003.CATALOG_not_13_digits.cue
pass1: parse error, line 1: "CD-DA CATALOG number must be 13 decimal digits"
NEGATIVE cuesheets/bad.030.FLAGS_multiple.cue
pass1: parse error, line 4: "found multiple FLAGS commands"
NEGATIVE cuesheets/bad.031.FLAGS_wrong_place_1.cue
pass1: parse error, line 1: "FLAGS command must come after TRACK but before INDEX"
NEGATIVE cuesheets/bad.032.FLAGS_wrong_place_2.cue
pass1: parse error, line 4: "FLAGS command must come after TRACK but before INDEX"
NEGATIVE cuesheets/bad.060.INDEX_wrong_place.cue
pass1: parse error, line 2: "found INDEX before any TRACK"
NEGATIVE cuesheets/bad.061.INDEX_missing_number.cue
pass1: parse error, line 4: "INDEX is missing index number"
NEGATIVE cuesheets/bad.062.INDEX_invalid_number_1.cue
pass1: parse error, line 4: "INDEX has invalid index number"
NEGATIVE cuesheets/bad.063.first_INDEX_not_0_or_1.cue
pass1: parse error, line 4: "first INDEX number of a TRACK must be 0 or 1"
NEGATIVE cuesheets/bad.064.INDEX_num_non_sequential.cue
pass1: parse error, line 5: "INDEX numbers must be sequential"
NEGATIVE cuesheets/bad.065.INDEX_num_out_of_range.cue
pass1: parse error, line 104: "CD-DA INDEX number must be between 0 and 99, inclusive"
NEGATIVE cuesheets/bad.066.INDEX_missing_offset.cue
pass1: parse error, line 4: "INDEX is missing an offset after the index number"
NEGATIVE cuesheets/bad.067.INDEX_illegal_offset.cue
pass1: parse error, line 4: "illegal INDEX offset (not of the form MM:SS:FF)"
NEGATIVE cuesheets/bad.068.INDEX_cdda_illegal_offset.cue
pass1: parse error, line 4: "illegal INDEX offset (not of the form MM:SS:FF)"
NEGATIVE cuesheets/bad.069.nonzero_first_INDEX.cue
pass1: parse error, line 4: "first INDEX of first TRACK must have an offset of 00:00:00"
NEGATIVE cuesheets/bad.070.INDEX_offset_not_ascending_1.cue
pass1: parse error, line 5: "CD-DA INDEX offsets must increase in time"
NEGATIVE cuesheets/bad.071.INDEX_offset_not_ascending_2.cue
pass1: parse error, line 6: "CD-DA INDEX offsets must increase in time"
NEGATIVE cuesheets/bad.110.ISRC_multiple.cue
pass1: parse error, line 4: "found multiple ISRC commands"
NEGATIVE cuesheets/bad.111.ISRC_wrong_place_1.cue
pass1: parse error, line 2: "ISRC command must come after TRACK but before INDEX"
NEGATIVE cuesheets/bad.112.ISRC_wrong_place_2.cue
pass1: parse error, line 4: "ISRC command must come after TRACK but before INDEX"
NEGATIVE cuesheets/bad.113.ISRC_missing_number.cue
pass1: parse error, line 3: "ISRC is missing ISRC number"
NEGATIVE cuesheets/bad.114.ISRC_invalid_number.cue
pass1: parse error, line 3: "invalid ISRC number"
NEGATIVE cuesheets/bad.130.TRACK_missing_INDEX_01_1.cue
pass1: parse error, line 2: "previous TRACK must specify at least one INDEX 01"
NEGATIVE cuesheets/bad.131.TRACK_missing_INDEX_01_2.cue
pass1: parse error, line 3: "previous TRACK must specify at least one INDEX 01"
NEGATIVE cuesheets/bad.132.TRACK_missing_INDEX_01_3.cue
pass1: parse error, line 3: "previous TRACK must specify at least one INDEX 01"
NEGATIVE cuesheets/bad.133.TRACK_missing_INDEX_01_4.cue
pass1: parse error, line 4: "previous TRACK must specify at least one INDEX 01"
NEGATIVE cuesheets/bad.134.TRACK_missing_number.cue
pass1: parse error, line 2: "TRACK is missing track number"
NEGATIVE cuesheets/bad.135.TRACK_invalid_number_1.cue
pass1: parse error, line 2: "TRACK has invalid track number"
NEGATIVE cuesheets/bad.136.TRACK_invalid_number_2.cue
pass1: parse error, line 2: "TRACK number must be greater than 0"
NEGATIVE cuesheets/bad.137.TRACK_cdda_out_of_range.cue
pass1: parse error, line 2: "CD-DA TRACK number must be between 1 and 99, inclusive"
NEGATIVE cuesheets/bad.138.TRACK_num_non_sequential.cue
pass1: parse error, line 6: "CD-DA TRACK numbers must be sequential"
NEGATIVE cuesheets/bad.139.TRACK_missing_type.cue
pass1: parse error, line 2: "TRACK is missing a track type after the track number"
NEGATIVE cuesheets/bad.140.no_TRACKs.cue
pass1: parse error, line 1: "there must be at least one TRACK command"
NEGATIVE cuesheets/bad.200.FLAC_leadin_missing_offset.cue
pass1: parse error, line 1: "FLAC__lead-in is missing offset"
NEGATIVE cuesheets/bad.201.FLAC_leadin_illegal_offset.cue
pass1: parse error, line 1: "illegal FLAC__lead-in offset"
NEGATIVE cuesheets/bad.202.FLAC_leadin_cdda_illegal_offset.cue
pass1: parse error, line 1: "illegal CD-DA FLAC__lead-in offset, must be even multiple of 588 samples"
NEGATIVE cuesheets/bad.230.FLAC_leadout_multiple.cue
pass1: parse error, line 3: "multiple FLAC__lead-out commands"
NEGATIVE cuesheets/bad.231.FLAC_leadout_missing_track.cue
pass1: parse error, line 1: "FLAC__lead-out is missing track number"
NEGATIVE cuesheets/bad.232.FLAC_leadout_illegal_track.cue
pass1: parse error, line 1: "illegal FLAC__lead-out track number"
NEGATIVE cuesheets/bad.233.FLAC_leadout_missing_offset.cue
pass1: parse error, line 1: "FLAC__lead-out is missing offset"
NEGATIVE cuesheets/bad.234.FLAC_leadout_illegal_offset.cue
pass1: parse error, line 1: "illegal FLAC__lead-out offset"
NEGATIVE cuesheets/bad.235.FLAC_leadout_offset_not_211680000.cue
pass1: parse error, line 1: "FLAC__lead-out offset does not match end-of-stream offset"
POSITIVE cuesheets/good.000.cue
POSITIVE cuesheets/good.001.cue

View File

@ -0,0 +1,64 @@
# FLAC - Free Lossless Audio Codec
# Copyright (C) 2001,2002 Josh Coalson
#
# This program is part of FLAC; 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.
EXTRA_DIST = \
bad.000.CATALOG_multiple.cue \
bad.001.CATALOG_missing_number.cue \
bad.002.CATALOG_number_too_long.cue \
bad.003.CATALOG_not_13_digits.cue \
bad.030.FLAGS_multiple.cue \
bad.031.FLAGS_wrong_place_1.cue \
bad.032.FLAGS_wrong_place_2.cue \
bad.060.INDEX_wrong_place.cue \
bad.061.INDEX_missing_number.cue \
bad.062.INDEX_invalid_number_1.cue \
bad.063.first_INDEX_not_0_or_1.cue \
bad.064.INDEX_num_non_sequential.cue \
bad.065.INDEX_num_out_of_range.cue \
bad.066.INDEX_missing_offset.cue \
bad.067.INDEX_illegal_offset.cue \
bad.068.INDEX_cdda_illegal_offset.cue \
bad.069.nonzero_first_INDEX.cue \
bad.070.INDEX_offset_not_ascending_1.cue \
bad.071.INDEX_offset_not_ascending_2.cue \
bad.110.ISRC_multiple.cue \
bad.111.ISRC_wrong_place_1.cue \
bad.112.ISRC_wrong_place_2.cue \
bad.113.ISRC_missing_number.cue \
bad.114.ISRC_invalid_number.cue \
bad.130.TRACK_missing_INDEX_01_1.cue \
bad.131.TRACK_missing_INDEX_01_2.cue \
bad.132.TRACK_missing_INDEX_01_3.cue \
bad.133.TRACK_missing_INDEX_01_4.cue \
bad.134.TRACK_missing_number.cue \
bad.135.TRACK_invalid_number_1.cue \
bad.136.TRACK_invalid_number_2.cue \
bad.137.TRACK_cdda_out_of_range.cue \
bad.138.TRACK_num_non_sequential.cue \
bad.139.TRACK_missing_type.cue \
bad.140.no_TRACKs.cue \
bad.200.FLAC_leadin_missing_offset.cue \
bad.201.FLAC_leadin_illegal_offset.cue \
bad.202.FLAC_leadin_cdda_illegal_offset.cue \
bad.230.FLAC_leadout_multiple.cue \
bad.231.FLAC_leadout_missing_track.cue \
bad.232.FLAC_leadout_illegal_track.cue \
bad.233.FLAC_leadout_missing_offset.cue \
bad.234.FLAC_leadout_illegal_offset.cue \
bad.235.FLAC_leadout_offset_not_211680000.cue \
good.000.cue \
good.001.cue

View File

@ -0,0 +1,5 @@
CATALOG 1234567890123
CATALOG 0234567890123
FILE "z.wav" WAVE
TRACK 01 AUDIO
INDEX 01 00:00:00

View File

@ -0,0 +1,4 @@
CATALOG
FILE "z.wav" WAVE
TRACK 01 AUDIO
INDEX 01 00:00:00

View File

@ -0,0 +1,4 @@
CATALOG 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
FILE "z.wav" WAVE
TRACK 01 AUDIO
INDEX 01 00:00:00

View File

@ -0,0 +1,4 @@
CATALOG 123456789012z
FILE "z.wav" WAVE
TRACK 01 AUDIO
INDEX 01 00:00:00

View File

@ -0,0 +1,5 @@
FILE "z.wav" WAVE
TRACK 01 AUDIO
FLAGS PRE
FLAGS 4CH
INDEX 01 00:00:00

View File

@ -0,0 +1,4 @@
FLAGS PRE
FILE "z.wav" WAVE
TRACK 01 AUDIO
INDEX 01 00:00:00

View File

@ -0,0 +1,4 @@
FILE "z.wav" WAVE
TRACK 01 AUDIO
INDEX 01 00:00:00
FLAGS PRE

View File

@ -0,0 +1,5 @@
FILE "z.wav" WAVE
INDEX 00 00:00:00
TRACK 01 AUDIO
FLAGS PRE
INDEX 01 00:00:00

View File

@ -0,0 +1,4 @@
FILE "z.wav" WAVE
TRACK 01 AUDIO
FLAGS PRE
INDEX

View File

@ -0,0 +1,4 @@
FILE "z.wav" WAVE
TRACK 01 AUDIO
FLAGS PRE
INDEX thhpt!

View File

@ -0,0 +1,4 @@
FILE "z.wav" WAVE
TRACK 01 AUDIO
FLAGS PRE
INDEX 02 00:00:00

View File

@ -0,0 +1,5 @@
FILE "z.wav" WAVE
TRACK 01 AUDIO
FLAGS PRE
INDEX 01 00:00:00
INDEX 00 00:00:00

View File

@ -0,0 +1,104 @@
FILE "z.wav" WAVE
TRACK 01 AUDIO
FLAGS PRE
INDEX 00 00:00:00
INDEX 01 02:10:15
INDEX 02 02:20:15
INDEX 03 02:30:15
INDEX 04 03:30:15
INDEX 05 03:31:15
INDEX 06 03:32:06
INDEX 07 03:32:07
INDEX 08 03:32:08
INDEX 09 03:32:09
INDEX 10 03:32:10
INDEX 11 03:32:11
INDEX 12 03:32:12
INDEX 13 03:32:13
INDEX 14 03:32:14
INDEX 15 03:32:15
INDEX 16 03:32:16
INDEX 17 03:32:17
INDEX 18 03:32:18
INDEX 19 03:32:19
INDEX 20 03:32:20
INDEX 21 03:32:21
INDEX 22 03:32:22
INDEX 23 03:32:23
INDEX 24 03:32:24
INDEX 25 03:32:25
INDEX 26 03:32:26
INDEX 27 03:32:27
INDEX 28 03:32:28
INDEX 29 03:32:29
INDEX 30 03:32:30
INDEX 31 03:32:31
INDEX 32 03:32:32
INDEX 33 03:32:33
INDEX 34 03:32:34
INDEX 35 03:32:35
INDEX 36 03:32:36
INDEX 37 03:32:37
INDEX 38 03:32:38
INDEX 39 03:32:39
INDEX 40 03:32:40
INDEX 41 03:32:41
INDEX 42 03:32:42
INDEX 43 03:32:43
INDEX 44 03:32:44
INDEX 45 03:32:45
INDEX 46 03:32:46
INDEX 47 03:32:47
INDEX 48 03:32:48
INDEX 49 03:32:49
INDEX 50 03:32:50
INDEX 51 03:32:51
INDEX 52 03:32:52
INDEX 53 03:32:53
INDEX 54 03:32:54
INDEX 55 03:32:55
INDEX 56 03:32:56
INDEX 57 03:32:57
INDEX 58 03:32:58
INDEX 59 03:32:59
INDEX 60 03:32:60
INDEX 61 03:32:61
INDEX 62 03:32:62
INDEX 63 03:32:63
INDEX 64 03:32:64
INDEX 65 03:32:65
INDEX 66 03:32:66
INDEX 67 03:32:67
INDEX 68 03:32:68
INDEX 69 03:32:69
INDEX 70 03:40:50
INDEX 71 03:40:51
INDEX 72 03:40:52
INDEX 73 03:40:53
INDEX 74 03:40:54
INDEX 75 03:40:55
INDEX 76 03:40:56
INDEX 77 03:40:57
INDEX 78 03:40:58
INDEX 79 03:40:59
INDEX 80 03:41:50
INDEX 81 03:41:51
INDEX 82 03:41:52
INDEX 83 03:41:53
INDEX 84 03:41:54
INDEX 85 03:41:55
INDEX 86 03:41:56
INDEX 87 03:41:57
INDEX 88 03:41:58
INDEX 89 03:41:59
INDEX 90 03:42:50
INDEX 91 03:42:51
INDEX 92 03:42:52
INDEX 93 03:42:53
INDEX 94 03:42:54
INDEX 95 03:42:55
INDEX 96 03:42:56
INDEX 97 03:42:57
INDEX 98 03:42:58
INDEX 99 03:42:59
INDEX 100 04:00:00

View File

@ -0,0 +1,4 @@
FILE "z.wav" WAVE
TRACK 01 AUDIO
FLAGS PRE
INDEX 01

View File

@ -0,0 +1,4 @@
FILE "z.wav" WAVE
TRACK 01 AUDIO
FLAGS PRE
INDEX 01 00:00.00

View File

@ -0,0 +1,4 @@
FILE "z.wav" WAVE
TRACK 01 AUDIO
FLAGS PRE
INDEX 01 588

View File

@ -0,0 +1,4 @@
FILE "z.wav" WAVE
TRACK 01 AUDIO
FLAGS PRE
INDEX 01 00:02:00

View File

@ -0,0 +1,5 @@
FILE "z.wav" WAVE
TRACK 01 AUDIO
INDEX 01 00:00:00
INDEX 02 00:02:00
INDEX 03 00:01:74

View File

@ -0,0 +1,6 @@
FILE "z.wav" WAVE
TRACK 01 AUDIO
INDEX 01 00:00:00
INDEX 02 00:02:00
TRACK 02 AUDIO
INDEX 01 00:01:74

View File

@ -0,0 +1,5 @@
FILE "z.wav" WAVE
TRACK 01 AUDIO
ISRC ABCDE1234567
ISRC ABCD01234567
INDEX 01 00:00:00

View File

@ -0,0 +1,4 @@
FILE "z.wav" WAVE
ISRC ABCD01234567
TRACK 01 AUDIO
INDEX 01 00:00:00

View File

@ -0,0 +1,4 @@
FILE "z.wav" WAVE
TRACK 01 AUDIO
INDEX 01 00:00:00
ISRC ABCD01234567

View File

@ -0,0 +1,4 @@
FILE "z.wav" WAVE
TRACK 01 AUDIO
ISRC
INDEX 01 00:00:00

View File

@ -0,0 +1,4 @@
FILE "z.wav" WAVE
TRACK 01 AUDIO
ISRC ABCD0123456Z
INDEX 01 00:00:00

View File

@ -0,0 +1,2 @@
FILE "z.wav" WAVE
TRACK 01 AUDIO

View File

@ -0,0 +1,3 @@
FILE "z.wav" WAVE
TRACK 01 AUDIO
INDEX 00 00:00:00

View File

@ -0,0 +1,4 @@
FILE "z.wav" WAVE
TRACK 01 AUDIO
TRACK 02 AUDIO
INDEX 01 00:02:00

View File

@ -0,0 +1,5 @@
FILE "z.wav" WAVE
TRACK 01 AUDIO
INDEX 00 00:00:00
TRACK 02 AUDIO
INDEX 01 00:02:00

View File

@ -0,0 +1,2 @@
FILE "z.wav" WAVE
TRACK

View File

@ -0,0 +1,2 @@
FILE "z.wav" WAVE
TRACK thhpt! AUDIO

View File

@ -0,0 +1,2 @@
FILE "z.wav" WAVE
TRACK 0 AUDIO

View File

@ -0,0 +1,2 @@
FILE "z.wav" WAVE
TRACK 100 AUDIO

View File

@ -0,0 +1,6 @@
FILE "z.wav" WAVE
TRACK 01 AUDIO
INDEX 01 0:0:0
TRACK 02 AUDIO
INDEX 01 2:0:0
TRACK 01 AUDIO

View File

@ -0,0 +1,2 @@
FILE "z.wav" WAVE
TRACK 01

View File

@ -0,0 +1 @@
FILE "z.wav" WAVE

View File

@ -0,0 +1 @@
REM FLAC__lead-in

View File

@ -0,0 +1 @@
REM FLAC__lead-in thhpt!

View File

@ -0,0 +1 @@
REM FLAC__lead-in 123

View File

@ -0,0 +1,3 @@
REM FLAC__lead-in 88200
REM FLAC__lead-out 170 211680000
REM FLAC__lead-out 170 211680588

View File

@ -0,0 +1 @@
REM FLAC__lead-out

View File

@ -0,0 +1 @@
REM FLAC__lead-out thhpt!

View File

@ -0,0 +1 @@
REM FLAC__lead-out 170

View File

@ -0,0 +1 @@
REM FLAC__lead-out 170 thhpt!

View File

@ -0,0 +1 @@
REM FLAC__lead-out 170 211680588

View File

@ -0,0 +1,3 @@
FILE "z.wav" WAVE
TRACK 01 AUDIO
INDEX 01 00:00:00

184
test/cuesheets/good.001.cue Normal file
View File

@ -0,0 +1,184 @@
REM FLAC__lead-in 88200
REM FLAC__lead-out 170 211680000
CATALOG 1234567890123
FILE "z.wav" WAVE
TRACK 01 AUDIO
FLAGS PRE
INDEX 01 00:00:00
TRACK 02 AUDIO
FLAGS PRE
ISRC ABCDE7654321
INDEX 00 02:09:12
INDEX 01 02:10:15
INDEX 02 02:20:15
INDEX 03 02:30:15
INDEX 04 03:30:15
INDEX 05 03:31:15
INDEX 06 03:32:06
INDEX 07 03:32:07
INDEX 08 03:32:08
INDEX 09 03:32:09
INDEX 10 03:32:10
INDEX 11 03:32:11
INDEX 12 03:32:12
INDEX 13 03:32:13
INDEX 14 03:32:14
INDEX 15 03:32:15
INDEX 16 03:32:16
INDEX 17 03:32:17
INDEX 18 03:32:18
INDEX 19 03:32:19
INDEX 20 03:32:20
INDEX 21 03:32:21
INDEX 22 03:32:22
INDEX 23 03:32:23
INDEX 24 03:32:24
INDEX 25 03:32:25
INDEX 26 03:32:26
INDEX 27 03:32:27
INDEX 28 03:32:28
INDEX 29 03:32:29
INDEX 30 03:32:30
INDEX 31 03:32:31
INDEX 32 03:32:32
INDEX 33 03:32:33
INDEX 34 03:32:34
INDEX 35 03:32:35
INDEX 36 03:32:36
INDEX 37 03:32:37
INDEX 38 03:32:38
INDEX 39 03:32:39
INDEX 40 03:32:40
INDEX 41 03:32:41
INDEX 42 03:32:42
INDEX 43 03:32:43
INDEX 44 03:32:44
INDEX 45 03:32:45
INDEX 46 03:32:46
INDEX 47 03:32:47
INDEX 48 03:32:48
INDEX 49 03:32:49
INDEX 50 03:32:50
INDEX 51 03:32:51
INDEX 52 03:32:52
INDEX 53 03:32:53
INDEX 54 03:32:54
INDEX 55 03:32:55
INDEX 56 03:32:56
INDEX 57 03:32:57
INDEX 58 03:32:58
INDEX 59 03:32:59
INDEX 60 03:32:60
INDEX 61 03:32:61
INDEX 62 03:32:62
INDEX 63 03:32:63
INDEX 64 03:32:64
INDEX 65 03:32:65
INDEX 66 03:32:66
INDEX 67 03:32:67
INDEX 68 03:32:68
INDEX 69 03:32:69
INDEX 70 03:40:50
INDEX 71 03:40:51
INDEX 72 03:40:52
INDEX 73 03:40:53
INDEX 74 03:40:54
INDEX 75 03:40:55
INDEX 76 03:40:56
INDEX 77 03:40:57
INDEX 78 03:40:58
INDEX 79 03:40:59
INDEX 80 03:41:50
INDEX 81 03:41:51
INDEX 82 03:41:52
INDEX 83 03:41:53
INDEX 84 03:41:54
INDEX 85 03:41:55
INDEX 86 03:41:56
INDEX 87 03:41:57
INDEX 88 03:41:58
INDEX 89 03:41:59
INDEX 90 03:42:50
INDEX 91 03:42:51
INDEX 92 03:42:52
INDEX 93 03:42:53
INDEX 94 03:42:54
INDEX 95 03:42:55
INDEX 96 03:42:56
INDEX 97 03:42:57
INDEX 98 03:42:58
INDEX 99 03:42:59
TRACK 03 AUDIO
ISRC ABCD76543210
INDEX 00 04:50:12
INDEX 01 04:51:72
TRACK 04 AUDIO
INDEX 00 06:36:10
INDEX 01 06:38:47
TRACK 05 AUDIO
INDEX 00 08:34:45
INDEX 01 08:36:15
TRACK 06 AUDIO
INDEX 00 13:20:22
INDEX 01 13:22:12
TRACK 07 AUDIO
INDEX 00 16:08:20
INDEX 01 16:11:17
TRACK 08 AUDIO
INDEX 01 17:48:37
TRACK 09 AUDIO
INDEX 00 19:38:17
INDEX 01 19:39:30
TRACK 10 AUDIO
INDEX 00 22:07:07
INDEX 01 22:08:20
TRACK 11 AUDIO
INDEX 01 24:16:45
TRACK 12 AUDIO
INDEX 01 26:13:67
TRACK 13 AUDIO
INDEX 01 28:03:27
TRACK 14 AUDIO
INDEX 00 30:22:42
INDEX 01 30:24:45
TRACK 15 AUDIO
INDEX 00 34:06:22
INDEX 01 34:07:62
TRACK 16 AUDIO
INDEX 00 35:54:30
INDEX 01 35:56:60
TRACK 17 AUDIO
INDEX 00 38:49:10
INDEX 01 38:51:22
TRACK 18 AUDIO
INDEX 00 41:14:15
INDEX 01 41:17:15
TRACK 19 AUDIO
INDEX 00 44:27:15
INDEX 01 44:28:45
TRACK 20 AUDIO
INDEX 00 48:07:17
INDEX 01 48:09:72
TRACK 21 AUDIO
INDEX 00 50:48:05
INDEX 01 50:49:27
TRACK 22 AUDIO
INDEX 00 53:29:72
INDEX 01 53:31:20
TRACK 23 AUDIO
INDEX 00 57:57:60
INDEX 01 58:00:40
TRACK 24 AUDIO
INDEX 00 61:52:65
INDEX 01 61:55:37
TRACK 25 AUDIO
INDEX 00 65:07:50
INDEX 01 65:10:52
TRACK 26 AUDIO
INDEX 00 68:30:05
INDEX 01 68:32:45
TRACK 27 AUDIO
INDEX 01 71:45:17
TRACK 28 AUDIO
INDEX 00 74:49:07
INDEX 01 74:51:47

85
test/test_grabbag.sh Executable file
View File

@ -0,0 +1,85 @@
#!/bin/sh
# FLAC - Free Lossless Audio Codec
# Copyright (C) 2001,2002 Josh Coalson
#
# This program is part of FLAC; 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.
LD_LIBRARY_PATH=../src/libFLAC/.libs:../src/share/grabbag/.libs:../obj/release/lib:../obj/debug/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
PATH=../src/test_cuesheet:../obj/release/b:../obj/debug/bin:$PATH
test_cuesheet -h 1>/dev/null 2>/dev/null || (echo "ERROR can't find test_cuesheet executable" 1>&2 && exit 1)
if [ $? != 0 ] ; then exit 1 ; fi
########################################################################
#
# test_cuesheet
#
########################################################################
log=cuesheet.log
bad_cuesheets=cuesheets/bad.*.cue
good_cuesheets=cuesheets/good.*.cue
good_leadout=`expr 80 \* 60 \* 44100`
bad_leadout=`expr $good_leadout + 1`
rm -f $log
#
# negative tests
#
for cuesheet in $bad_cuesheets ; do
echo "NEGATIVE $cuesheet" >> $log 2>&1
test_cuesheet $cuesheet $good_leadout cdda >> $log 2>&1
exit_code=$?
if [ "$exit_code" = 255 ] ; then
echo "Error: test script is broken"
exit 1
fi
cuesheet_pass1=${cuesheet}.1
cuesheet_pass2=${cuesheet}.2
rm -f $cuesheet_pass1 $cuesheet_pass2
done
#
# positve tests
#
for cuesheet in $good_cuesheets ; do
echo "POSITIVE $cuesheet" >> $log 2>&1
test_cuesheet $cuesheet $good_leadout cdda >> $log 2>&1
exit_code=$?
if [ "$exit_code" = 255 ] ; then
echo "Error: test script is broken"
exit 1
elif [ "$exit_code" != 0 ] ; then
echo "Error: good cuesheet is broken"
exit 1
fi
cuesheet_pass1=${cuesheet}.1
cuesheet_pass2=${cuesheet}.2
diff $cuesheet_pass1 $cuesheet_pass2 >> $log 2>&1
if [ $? != 0 ] ; then
echo "Error: pass1 and pass2 output differ"
exit 1
fi
rm -f $cuesheet_pass1 $cuesheet_pass2
done
diff cuesheet.ok $log > cuesheet.diff
if [ $? != 0 ] ; then
echo "Error: .log file does not match .ok file, see cuesheet.diff"
exit 1
fi