blob: aeae8bb750a8fc16725d0a8e86edb512e492aecb [file] [log] [blame]
Josh Coalson463d0f82002-12-10 06:41:27 +00001#!/bin/sh
2
3# FLAC - Free Lossless Audio Codec
4# Copyright (C) 2001,2002 Josh Coalson
5#
6# This program is part of FLAC; you can redistribute it and/or
7# modify it under the terms of the GNU General Public License
8# as published by the Free Software Foundation; either version 2
9# of the License, or (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program; if not, write to the Free Software
18# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
Josh Coalson8fac5d62002-12-12 03:57:47 +000020die ()
21{
22 echo $* 1>&2
23 exit 1
24}
25
Josh Coalson463d0f82002-12-10 06:41:27 +000026LD_LIBRARY_PATH=../src/libFLAC/.libs:../obj/release/lib:../obj/debug/lib:$LD_LIBRARY_PATH
27export LD_LIBRARY_PATH
28PATH=../src/flac:../src/test_streams:../obj/release/bin:../obj/debug/bin:$PATH
29
Josh Coalson8fac5d62002-12-12 03:57:47 +000030flac --help 1>/dev/null 2>/dev/null || die "ERROR can't find flac executable"
Josh Coalson463d0f82002-12-10 06:41:27 +000031
32run_flac ()
33{
34 if [ "$FLAC__VALGRIND" = yes ] ; then
35 valgrind --leak-check=yes --show-reachable=yes --num-callers=10 --logfile-fd=4 flac $* 4>>valgrind.log
36 else
37 flac $*
38 fi
39}
40
41echo "Checking for --ogg support in flac..."
42if flac --ogg --silent --force-raw-format --endian=little --sign=signed --channels=1 --bps=8 --sample-rate=44100 -c $0 1>/dev/null 2>&1 ; then
43 has_ogg=yes;
44 echo "flac --ogg works"
45else
46 has_ogg=no;
47 echo "flac --ogg doesn't work"
48fi
49
Josh Coalson8fac5d62002-12-12 03:57:47 +000050############################################################################
51# test --skip and --until
52############################################################################
53
Josh Coalson463d0f82002-12-10 06:41:27 +000054#
Josh Coalson8fac5d62002-12-12 03:57:47 +000055# first make some chopped-up files
Josh Coalson463d0f82002-12-10 06:41:27 +000056#
Josh Coalson8fac5d62002-12-12 03:57:47 +000057echo "abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMN" > master.raw
58dddie="die ERROR: creating files for --skip/--until tests"
59dd if=master.raw ibs=1 count=50 of=50c.raw 2>/dev/null || $dddie
60dd if=master.raw ibs=1 skip=10 count=40 of=50c.skip10.raw 2>/dev/null || $dddie
61dd if=master.raw ibs=1 skip=11 count=39 of=50c.skip11.raw 2>/dev/null || $dddie
62dd if=master.raw ibs=1 count=40 of=50c.until40.raw 2>/dev/null || $dddie
63dd if=master.raw ibs=1 count=39 of=50c.until39.raw 2>/dev/null || $dddie
64dd if=master.raw ibs=1 skip=10 count=30 of=50c.skip10.until40.raw 2>/dev/null || $dddie
65dd if=master.raw ibs=1 skip=10 count=29 of=50c.skip10.until39.raw 2>/dev/null || $dddie
Josh Coalson463d0f82002-12-10 06:41:27 +000066
Josh Coalson8fac5d62002-12-12 03:57:47 +000067eopt="--silent --verify --lax --force-raw-format --endian=big --sign=signed --sample-rate=10 --bps=8 --channels=1"
68dopt="--silent --decode --force-raw-format --endian=big --sign=signed"
69
70#
71# test --skip when encoding
72#
73
74echo -n "testing --skip=# (encode)... "
75run_flac $eopt --skip=10 -o z50c.skip10.flac 50c.raw || die "ERROR generating FLAC file"
76run_flac $dopt -o z50c.skip10.raw z50c.skip10.flac || die "ERROR decoding FLAC file"
77cmp 50c.skip10.raw z50c.skip10.raw || die "ERROR: file mismatch for --skip=10 (encode)"
78rm -f z50c.skip10.flac z50c.skip10.raw
Josh Coalson463d0f82002-12-10 06:41:27 +000079echo OK
80
Josh Coalson8fac5d62002-12-12 03:57:47 +000081echo -n "testing --skip=mm:ss (encode)... "
82run_flac $eopt --skip=0:01 -o z50c.skip0:01.flac 50c.raw || die "ERROR generating FLAC file"
83run_flac $dopt -o z50c.skip0:01.raw z50c.skip0:01.flac || die "ERROR decoding FLAC file"
84cmp 50c.skip10.raw z50c.skip0:01.raw || die "ERROR: file mismatch for --skip=0:01 (encode)"
85rm -f z50c.skip0:01.flac z50c.skip0:01.raw
Josh Coalson463d0f82002-12-10 06:41:27 +000086echo OK
87
Josh Coalson8fac5d62002-12-12 03:57:47 +000088echo -n "testing --skip=mm:ss.sss (encode)... "
89run_flac $eopt --skip=0:01.1001 -o z50c.skip0:01.1001.flac 50c.raw || die "ERROR generating FLAC file"
90run_flac $dopt -o z50c.skip0:01.1001.raw z50c.skip0:01.1001.flac || die "ERROR decoding FLAC file"
91cmp 50c.skip11.raw z50c.skip0:01.1001.raw || die "ERROR: file mismatch for --skip=0:01.1001 (encode)"
92rm -f z50c.skip0:01.1001.flac z50c.skip0:01.1001.raw
Josh Coalson463d0f82002-12-10 06:41:27 +000093echo OK
94
Josh Coalson8fac5d62002-12-12 03:57:47 +000095#
96# test --skip when decoding
97#
98
99echo -n "testing --skip=# (decode)... "
100run_flac $eopt -o z50c.flac 50c.raw || die "ERROR generating FLAC file"
101run_flac $dopt --skip=10 -o z50c.skip10.raw z50c.flac || die "ERROR decoding FLAC file"
102cmp 50c.skip10.raw z50c.skip10.raw || die "ERROR: file mismatch for --skip=10 (decode)"
103rm -f z50c.skip10.raw
Josh Coalson463d0f82002-12-10 06:41:27 +0000104echo OK
105
Josh Coalson8fac5d62002-12-12 03:57:47 +0000106echo -n "testing --skip=mm:ss (decode)... "
107run_flac $dopt --skip=0:01 -o z50c.skip0:01.raw z50c.flac || die "ERROR decoding FLAC file"
108cmp 50c.skip10.raw z50c.skip0:01.raw || die "ERROR: file mismatch for --skip=0:01 (decode)"
109rm -f z50c.skip0:01.raw
Josh Coalson463d0f82002-12-10 06:41:27 +0000110echo OK
111
Josh Coalson8fac5d62002-12-12 03:57:47 +0000112echo -n "testing --skip=mm:ss.sss (decode)... "
113run_flac $dopt --skip=0:01.1001 -o z50c.skip0:01.1001.raw z50c.flac || die "ERROR decoding FLAC file"
114cmp 50c.skip11.raw z50c.skip0:01.1001.raw || die "ERROR: file mismatch for --skip=0:01.1001 (decode)"
115rm -f z50c.skip0:01.1001.raw
Josh Coalson463d0f82002-12-10 06:41:27 +0000116echo OK
117
Josh Coalson8fac5d62002-12-12 03:57:47 +0000118rm -f z50c.flac
Josh Coalson463d0f82002-12-10 06:41:27 +0000119
Josh Coalson8fac5d62002-12-12 03:57:47 +0000120#
121# test --until when encoding
122#
123
124echo -n "testing --until=# (encode)... "
125run_flac $eopt --until=40 -o z50c.until40.flac 50c.raw || die "ERROR generating FLAC file"
126run_flac $dopt -o z50c.until40.raw z50c.until40.flac || die "ERROR decoding FLAC file"
127cmp 50c.until40.raw z50c.until40.raw || die "ERROR: file mismatch for --until=40 (encode)"
128rm -f z50c.until40.flac z50c.until40.raw
129echo OK
130
131echo -n "testing --until=mm:ss (encode)... "
132run_flac $eopt --until=0:04 -o z50c.until0:04.flac 50c.raw || die "ERROR generating FLAC file"
133run_flac $dopt -o z50c.until0:04.raw z50c.until0:04.flac || die "ERROR decoding FLAC file"
134cmp 50c.until40.raw z50c.until0:04.raw || die "ERROR: file mismatch for --until=0:04 (encode)"
135rm -f z50c.until0:04.flac z50c.until0:04.raw
136echo OK
137
138echo -n "testing --until=mm:ss.sss (encode)... "
139run_flac $eopt --until=0:03.9001 -o z50c.until0:03.9001.flac 50c.raw || die "ERROR generating FLAC file"
140run_flac $dopt -o z50c.until0:03.9001.raw z50c.until0:03.9001.flac || die "ERROR decoding FLAC file"
141cmp 50c.until39.raw z50c.until0:03.9001.raw || die "ERROR: file mismatch for --until=0:03.9001 (encode)"
142rm -f z50c.until0:03.9001.flac z50c.until0:03.9001.raw
143echo OK
144
145echo -n "testing --until=-# (encode)... "
146run_flac $eopt --until=-10 -o z50c.until-10.flac 50c.raw || die "ERROR generating FLAC file"
147run_flac $dopt -o z50c.until-10.raw z50c.until-10.flac || die "ERROR decoding FLAC file"
148cmp 50c.until40.raw z50c.until-10.raw || die "ERROR: file mismatch for --until=-10 (encode)"
149rm -f z50c.until-10.flac z50c.until-10.raw
150echo OK
151
152echo -n "testing --until=-mm:ss (encode)... "
153run_flac $eopt --until=-0:01 -o z50c.until-0:01.flac 50c.raw || die "ERROR generating FLAC file"
154run_flac $dopt -o z50c.until-0:01.raw z50c.until-0:01.flac || die "ERROR decoding FLAC file"
155cmp 50c.until40.raw z50c.until-0:01.raw || die "ERROR: file mismatch for --until=-0:01 (encode)"
156rm -f z50c.until-0:01.flac z50c.until-0:01.raw
157echo OK
158
159echo -n "testing --until=-mm:ss.sss (encode)... "
160run_flac $eopt --until=-0:01.1001 -o z50c.until-0:01.1001.flac 50c.raw || die "ERROR generating FLAC file"
161run_flac $dopt -o z50c.until-0:01.1001.raw z50c.until-0:01.1001.flac || die "ERROR decoding FLAC file"
162cmp 50c.until39.raw z50c.until-0:01.1001.raw || die "ERROR: file mismatch for --until=-0:01.1001 (encode)"
163rm -f z50c.until-0:01.1001.flac z50c.until-0:01.1001.raw
164echo OK
165
166#
167# test --until when decoding
168#
169
170run_flac $eopt -o z50c.flac 50c.raw || die "ERROR generating FLAC file"
171
172echo -n "testing --until=# (decode)... "
173run_flac $dopt --until=40 -o z50c.until40.raw z50c.flac || die "ERROR decoding FLAC file"
174cmp 50c.until40.raw z50c.until40.raw || die "ERROR: file mismatch for --until=40 (decode)"
175rm -f z50c.until40.raw
176echo OK
177
178echo -n "testing --until=mm:ss (decode)... "
179run_flac $dopt --until=0:04 -o z50c.until0:04.raw z50c.flac || die "ERROR decoding FLAC file"
180cmp 50c.until40.raw z50c.until0:04.raw || die "ERROR: file mismatch for --until=0:04 (decode)"
181rm -f z50c.until0:04.raw
182echo OK
183
184echo -n "testing --until=mm:ss.sss (decode)... "
185run_flac $dopt --until=0:03.9001 -o z50c.until0:03.9001.raw z50c.flac || die "ERROR decoding FLAC file"
186cmp 50c.until39.raw z50c.until0:03.9001.raw || die "ERROR: file mismatch for --until=0:03.9001 (decode)"
187rm -f z50c.until0:03.9001.raw
188echo OK
189
190echo -n "testing --until=-# (decode)... "
191run_flac $dopt --until=-10 -o z50c.until-10.raw z50c.flac || die "ERROR decoding FLAC file"
192cmp 50c.until40.raw z50c.until-10.raw || die "ERROR: file mismatch for --until=-10 (decode)"
193rm -f z50c.until-10.raw
194echo OK
195
196echo -n "testing --until=-mm:ss (decode)... "
197run_flac $dopt --until=-0:01 -o z50c.until-0:01.raw z50c.flac || die "ERROR decoding FLAC file"
198cmp 50c.until40.raw z50c.until-0:01.raw || die "ERROR: file mismatch for --until=-0:01 (decode)"
199rm -f z50c.until-0:01.raw
200echo OK
201
202echo -n "testing --until=-mm:ss.sss (decode)... "
203run_flac $dopt --until=-0:01.1001 -o z50c.until-0:01.1001.raw z50c.flac || die "ERROR decoding FLAC file"
204cmp 50c.until39.raw z50c.until-0:01.1001.raw || die "ERROR: file mismatch for --until=-0:01.1001 (decode)"
205rm -f z50c.until-0:01.1001.raw
206echo OK
207
208rm -f z50c.flac
209
210#
211# test --skip and --until when encoding
212#
213
214echo -n "testing --skip=10 --until=# (encode)... "
215run_flac $eopt --skip=10 --until=40 -o z50c.skip10.until40.flac 50c.raw || die "ERROR generating FLAC file"
216run_flac $dopt -o z50c.skip10.until40.raw z50c.skip10.until40.flac || die "ERROR decoding FLAC file"
217cmp 50c.skip10.until40.raw z50c.skip10.until40.raw || die "ERROR: file mismatch for --skip=10 --until=40 (encode)"
218rm -f z50c.skip10.until40.flac z50c.skip10.until40.raw
219echo OK
220
221echo -n "testing --skip=10 --until=mm:ss (encode)... "
222run_flac $eopt --skip=10 --until=0:04 -o z50c.skip10.until0:04.flac 50c.raw || die "ERROR generating FLAC file"
223run_flac $dopt -o z50c.skip10.until0:04.raw z50c.skip10.until0:04.flac || die "ERROR decoding FLAC file"
224cmp 50c.skip10.until40.raw z50c.skip10.until0:04.raw || die "ERROR: file mismatch for --skip=10 --until=0:04 (encode)"
225rm -f z50c.skip10.until0:04.flac z50c.skip10.until0:04.raw
226echo OK
227
228echo -n "testing --skip=10 --until=mm:ss.sss (encode)... "
229run_flac $eopt --skip=10 --until=0:03.9001 -o z50c.skip10.until0:03.9001.flac 50c.raw || die "ERROR generating FLAC file"
230run_flac $dopt -o z50c.skip10.until0:03.9001.raw z50c.skip10.until0:03.9001.flac || die "ERROR decoding FLAC file"
231cmp 50c.skip10.until39.raw z50c.skip10.until0:03.9001.raw || die "ERROR: file mismatch for --skip=10 --until=0:03.9001 (encode)"
232rm -f z50c.skip10.until0:03.9001.flac z50c.skip10.until0:03.9001.raw
233echo OK
234
235echo -n "testing --skip=10 --until=+# (encode)... "
236run_flac $eopt --skip=10 --until=+30 -o z50c.skip10.until+30.flac 50c.raw || die "ERROR generating FLAC file"
237run_flac $dopt -o z50c.skip10.until+30.raw z50c.skip10.until+30.flac || die "ERROR decoding FLAC file"
238cmp 50c.skip10.until40.raw z50c.skip10.until+30.raw || die "ERROR: file mismatch for --skip=10 --until=+30 (encode)"
239rm -f z50c.skip10.until+30.flac z50c.skip10.until+30.raw
240echo OK
241
242echo -n "testing --skip=10 --until=+mm:ss (encode)... "
243run_flac $eopt --skip=10 --until=+0:03 -o z50c.skip10.until+0:03.flac 50c.raw || die "ERROR generating FLAC file"
244run_flac $dopt -o z50c.skip10.until+0:03.raw z50c.skip10.until+0:03.flac || die "ERROR decoding FLAC file"
245cmp 50c.skip10.until40.raw z50c.skip10.until+0:03.raw || die "ERROR: file mismatch for --skip=10 --until=+0:03 (encode)"
246rm -f z50c.skip10.until+0:03.flac z50c.skip10.until+0:03.raw
247echo OK
248
249echo -n "testing --skip=10 --until=+mm:ss.sss (encode)... "
250run_flac $eopt --skip=10 --until=+0:02.9001 -o z50c.skip10.until+0:02.9001.flac 50c.raw || die "ERROR generating FLAC file"
251run_flac $dopt -o z50c.skip10.until+0:02.9001.raw z50c.skip10.until+0:02.9001.flac || die "ERROR decoding FLAC file"
252cmp 50c.skip10.until39.raw z50c.skip10.until+0:02.9001.raw || die "ERROR: file mismatch for --skip=10 --until=+0:02.9001 (encode)"
253rm -f z50c.skip10.until+0:02.9001.flac z50c.skip10.until+0:02.9001.raw
254echo OK
255
256echo -n "testing --skip=10 --until=-# (encode)... "
257run_flac $eopt --skip=10 --until=-10 -o z50c.skip10.until-10.flac 50c.raw || die "ERROR generating FLAC file"
258run_flac $dopt -o z50c.skip10.until-10.raw z50c.skip10.until-10.flac || die "ERROR decoding FLAC file"
259cmp 50c.skip10.until40.raw z50c.skip10.until-10.raw || die "ERROR: file mismatch for --skip=10 --until=-10 (encode)"
260rm -f z50c.skip10.until-10.flac z50c.skip10.until-10.raw
261echo OK
262
263echo -n "testing --skip=10 --until=-mm:ss (encode)... "
264run_flac $eopt --skip=10 --until=-0:01 -o z50c.skip10.until-0:01.flac 50c.raw || die "ERROR generating FLAC file"
265run_flac $dopt -o z50c.skip10.until-0:01.raw z50c.skip10.until-0:01.flac || die "ERROR decoding FLAC file"
266cmp 50c.skip10.until40.raw z50c.skip10.until-0:01.raw || die "ERROR: file mismatch for --skip=10 --until=-0:01 (encode)"
267rm -f z50c.skip10.until-0:01.flac z50c.skip10.until-0:01.raw
268echo OK
269
270echo -n "testing --skip=10 --until=-mm:ss.sss (encode)... "
271run_flac $eopt --skip=10 --until=-0:01.1001 -o z50c.skip10.until-0:01.1001.flac 50c.raw || die "ERROR generating FLAC file"
272run_flac $dopt -o z50c.skip10.until-0:01.1001.raw z50c.skip10.until-0:01.1001.flac || die "ERROR decoding FLAC file"
273cmp 50c.skip10.until39.raw z50c.skip10.until-0:01.1001.raw || die "ERROR: file mismatch for --skip=10 --until=-0:01.1001 (encode)"
274rm -f z50c.skip10.until-0:01.1001.flac z50c.skip10.until-0:01.1001.raw
275echo OK
276
277#
278# test --skip and --until when decoding
279#
280
281run_flac $eopt -o z50c.flac 50c.raw || die "ERROR generating FLAC file"
282
283echo -n "testing --skip=10 --until=# (decode)... "
284run_flac $dopt --skip=10 --until=40 -o z50c.skip10.until40.raw z50c.flac || die "ERROR decoding FLAC file"
285cmp 50c.skip10.until40.raw z50c.skip10.until40.raw || die "ERROR: file mismatch for --skip=10 --until=40 (decode)"
286rm -f z50c.skip10.until40.raw
287echo OK
288
289echo -n "testing --skip=10 --until=mm:ss (decode)... "
290run_flac $dopt --skip=10 --until=0:04 -o z50c.skip10.until0:04.raw z50c.flac || die "ERROR decoding FLAC file"
291cmp 50c.skip10.until40.raw z50c.skip10.until0:04.raw || die "ERROR: file mismatch for --skip=10 --until=0:04 (decode)"
292rm -f z50c.skip10.until0:04.raw
293echo OK
294
295echo -n "testing --skip=10 --until=mm:ss.sss (decode)... "
296run_flac $dopt --skip=10 --until=0:03.9001 -o z50c.skip10.until0:03.9001.raw z50c.flac || die "ERROR decoding FLAC file"
297cmp 50c.skip10.until39.raw z50c.skip10.until0:03.9001.raw || die "ERROR: file mismatch for --skip=10 --until=0:03.9001 (decode)"
298rm -f z50c.skip10.until0:03.9001.raw
299echo OK
300
301echo -n "testing --skip=10 --until=-# (decode)... "
302run_flac $dopt --skip=10 --until=-10 -o z50c.skip10.until-10.raw z50c.flac || die "ERROR decoding FLAC file"
303cmp 50c.skip10.until40.raw z50c.skip10.until-10.raw || die "ERROR: file mismatch for --skip=10 --until=-10 (decode)"
304rm -f z50c.skip10.until-10.raw
305echo OK
306
307echo -n "testing --skip=10 --until=-mm:ss (decode)... "
308run_flac $dopt --skip=10 --until=-0:01 -o z50c.skip10.until-0:01.raw z50c.flac || die "ERROR decoding FLAC file"
309cmp 50c.skip10.until40.raw z50c.skip10.until-0:01.raw || die "ERROR: file mismatch for --skip=10 --until=-0:01 (decode)"
310rm -f z50c.skip10.until-0:01.raw
311echo OK
312
313echo -n "testing --skip=10 --until=-mm:ss.sss (decode)... "
314run_flac $dopt --skip=10 --until=-0:01.1001 -o z50c.skip10.until-0:01.1001.raw z50c.flac || die "ERROR decoding FLAC file"
315cmp 50c.skip10.until39.raw z50c.skip10.until-0:01.1001.raw || die "ERROR: file mismatch for --skip=10 --until=-0:01.1001 (decode)"
316rm -f z50c.skip10.until-0:01.1001.raw
317echo OK
318
319rm -f z50c.flac
320
321#@@@@@@
322exit 123
Josh Coalson463d0f82002-12-10 06:41:27 +0000323
324#
325# multi-file tests
326#
327
328echo "Generating streams..."
329if [ ! -f wacky1.wav ] ; then
Josh Coalson8fac5d62002-12-12 03:57:47 +0000330 test_streams || die "ERROR during test_streams"
Josh Coalson463d0f82002-12-10 06:41:27 +0000331fi
332
333echo "Generating multiple input files from noise..."
Josh Coalson8fac5d62002-12-12 03:57:47 +0000334run_flac --verify --silent --force-raw-format --endian=big --sign=signed --sample-rate=44100 --bps=16 --channels=2 noise.raw || die "ERROR generating FLAC file"
335run_flac --decode --silent noise.flac || die "ERROR generating WAVE file"
Josh Coalson463d0f82002-12-10 06:41:27 +0000336rm -f noise.flac
337mv noise.wav file0.wav
338cp file0.wav file1.wav
339cp file1.wav file2.wav
340
341test_multifile ()
342{
343 streamtype=$1
344 sector_align=$2
345 encode_options="$3"
346
347 if [ $streamtype = ogg ] ; then
348 suffix=ogg
349 encode_options="$encode_options --ogg"
350 else
351 suffix=flac
352 fi
353
354 if [ $sector_align = sector_align ] ; then
355 encode_options="$encode_options --sector-align"
356 fi
357
Josh Coalson8fac5d62002-12-12 03:57:47 +0000358 run_flac $encode_options file0.wav file1.wav file2.wav || die "ERROR"
Josh Coalson463d0f82002-12-10 06:41:27 +0000359 for n in 0 1 2 ; do
360 mv file$n.$suffix file${n}x.$suffix
361 done
Josh Coalson8fac5d62002-12-12 03:57:47 +0000362 run_flac --decode file0x.$suffix file1x.$suffix file2x.$suffix || die "ERROR"
Josh Coalson463d0f82002-12-10 06:41:27 +0000363 if [ $sector_align != sector_align ] ; then
364 for n in 0 1 2 ; do
Josh Coalson8fac5d62002-12-12 03:57:47 +0000365 cmp file$n.wav file${n}x.wav || die "ERROR: file mismatch on file #$n"
Josh Coalson463d0f82002-12-10 06:41:27 +0000366 done
367 fi
368 for n in 0 1 2 ; do
369 rm -f file${n}x.$suffix file${n}x.wav
370 done
371}
372
373echo "Testing multiple files without verify..."
374test_multifile flac no_sector_align ""
375
376echo "Testing multiple files with verify..."
377test_multifile flac no_sector_align "--verify"
378
379echo "Testing multiple files with --sector-align, without verify..."
380test_multifile flac sector_align ""
381
382echo "Testing multiple files with --sector-align, with verify..."
383test_multifile flac sector_align "--verify"
384
385if [ $has_ogg = "yes" ] ; then
386 echo "Testing multiple files with --ogg, without verify..."
387 test_multifile ogg no_sector_align ""
388
389 echo "Testing multiple files with --ogg, with verify..."
390 test_multifile ogg no_sector_align "--verify"
391
392 echo "Testing multiple files with --ogg and --sector-align, without verify..."
393 test_multifile ogg sector_align ""
394
395 echo "Testing multiple files with --ogg and --sector-align, with verify..."
396 test_multifile sector_align ogg "--verify"
397
398 echo "Testing multiple files with --ogg and --serial-number, with verify..."
399 test_multifile ogg no_sector_align "--serial-number=321 --verify"
400fi