diff tests/test-summaries.sh @ 105:76d9d86ae6cd

Add summary test with segments
author Chris Cannam
date Wed, 01 Oct 2014 17:50:58 +0100
parents fae326c22df5
children 8b4924a9a072
line wrap: on
line diff
--- a/tests/test-summaries.sh	Wed Oct 01 15:19:45 2014 +0100
+++ b/tests/test-summaries.sh	Wed Oct 01 17:50:58 2014 +0100
@@ -4,6 +4,7 @@
 r=$mypath/../sonic-annotator
 
 infile=$mypath/audio/3clicks8.wav
+infile2=$mypath/audio/6clicks8.wav
 tmpfile=$mypath/tmp_1_$$
 tmpcanonical=$mypath/tmp_2_$$
 expcanonical=$mypath/tmp_exp_2_$$
@@ -78,6 +79,12 @@
 compare $tmpfile ${expected}-from-rdf-summaries-only.csv || \
     faildiff "Output mismatch for transform $stransform with summary-only" $tmpfile ${expected}-from-rdf-summaries-only.csv
 
+$r -t $transform -w csv --csv-stdout --summary-only -S median --segments 0,9.9 $infile2 > $tmpfile 2>/dev/null || \
+    fail "Fails to run transform $stransform with CSV output and segments"
+
+compare $tmpfile ${expected}-segments.csv || \
+    faildiff "Output mismatch for transform $stransform with segments" $tmpfile ${expected}-segments.csv
+
 $r -t $stransform -w rdf --rdf-stdout $infile > $tmpfile 2>/dev/null || \
     fail "Fails to run transform $stransform with RDF output"