add some tests for cuesheet importing/exporting
authorJosh Coalson <jcoalson@users.sourceforce.net>
Wed, 27 Nov 2002 04:46:14 +0000 (04:46 +0000)
committerJosh Coalson <jcoalson@users.sourceforce.net>
Wed, 27 Nov 2002 04:46:14 +0000 (04:46 +0000)
test/Makefile.am
test/Makefile.lite
test/test_metaflac.sh

index 7c08020..5d0568d 100644 (file)
@@ -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
index c337207..90f1cd4 100644 (file)
@@ -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
index f334022..9fb4633 100755 (executable)
@@ -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