From 3c75a397b9331d561c63754bdbb8e972fb3e6b46 Mon Sep 17 00:00:00 2001 From: Josh Coalson Date: Wed, 27 Nov 2002 04:46:14 +0000 Subject: [PATCH] add some tests for cuesheet importing/exporting --- test/Makefile.am | 6 ++++-- test/Makefile.lite | 2 +- test/test_metaflac.sh | 25 +++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/test/Makefile.am b/test/Makefile.am index 7c08020f..5d0568d7 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -59,5 +59,7 @@ CLEANFILES = \ $(wildcard ../../test_files/bins/*.raw) \ $(wildcard ../../test_files/bins/*.flac) \ $(wildcard ../../test_files/bins/*.cmp) \ - $(wildcard *.diff) - $(wildcard *.log) + $(wildcard *.diff) \ + $(wildcard *.log) \ + $(wildcard *.cue) \ + core diff --git a/test/Makefile.lite b/test/Makefile.lite index c3372077..90f1cd4b 100644 --- a/test/Makefile.lite +++ b/test/Makefile.lite @@ -36,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 *.diff *.log core + rm -f *.raw *.flac *.ogg *.cmp *.wav ../../test_files/bins/*.raw ../../test_files/bins/*.flac ../../test_files/bins/*.cmp *.diff *.log *.cue core diff --git a/test/test_metaflac.sh b/test/test_metaflac.sh index f3340226..9fb46338 100755 --- a/test/test_metaflac.sh +++ b/test/test_metaflac.sh @@ -275,4 +275,29 @@ check_exit rm vc.txt +cs_in=cuesheets/good.000.cue +cs_out=metaflac.cue +cs_out2=metaflac2.cue +(set -x && $METAFLAC --import-cuesheet-from="$cs_in" $flacfile) +check_exit +check_flac +(set -x && $METAFLAC --export-cuesheet-to=$cs_out $flacfile) +check_exit +(set -x && $METAFLAC --remove --block-type=CUESHEET $flacfile) +check_exit +check_flac +(set -x && $METAFLAC --import-cuesheet-from=$cs_out $flacfile) +check_exit +check_flac +(set -x && $METAFLAC --export-cuesheet-to=$cs_out2 $flacfile) +check_exit +echo "comparing cuesheets:" +if diff $cs_out $cs_out2 ; then : ; else + echo "ERROR, cuesheets should be identical" + exit 1 +fi +echo identical + +rm -f $cs_out $cs_out2 + exit 0