diff tests/test-csv-writer/test-csv-writer.sh @ 158:a2310369b2cc labfile

Add fill-ends option to CSV writer (and test it)
author Chris Cannam
date Wed, 15 Oct 2014 10:18:13 +0100
parents 0fd5c3c28814
children e8f2f530c091
line wrap: on
line diff
--- a/tests/test-csv-writer/test-csv-writer.sh	Wed Oct 15 08:00:01 2014 +0100
+++ b/tests/test-csv-writer/test-csv-writer.sh	Wed Oct 15 10:18:13 2014 +0100
@@ -25,6 +25,14 @@
     csvcompare "$tmpcsv" "$mypath/expected/$output-$flag.csv" || \
 	faildiff "Output differs from expected for output $output and $flag flag" "$tmpcsv" "$mypath/expected/$output-$flag.csv"
 
+    flag=fill-ends
+
+    $r -d "$testplug:$output" -w csv --csv-$flag --csv-stdout "$infile" 2>/dev/null > "$tmpcsv" || \
+	fail "Failed to run for plugin $testplug with output $output and $flag flag"
+
+    csvcompare "$tmpcsv" "$mypath/expected/$output-$flag.csv" || \
+	faildiff "Output differs from expected for output $output and $flag flag" "$tmpcsv" "$mypath/expected/$output-$flag.csv"
+
     flag=end-times
 
     $r -d "$testplug:$output" -w csv --csv-$flag --csv-stdout "$infile" 2>/dev/null > "$tmpcsv" || \
@@ -41,6 +49,14 @@
     csvcompare "$tmpcsv" "$mypath/expected/$output-$flag.csv" || \
 	faildiff "Output differs from expected for output $output and $flag flag" "$tmpcsv" "$mypath/expected/$output-$flag.csv"
 
+    flag=all
+
+    $r -d "$testplug:$output" -w csv --csv-sample-timing --csv-fill-ends --csv-end-times --csv-separator '@' --csv-stdout "$infile" 2>/dev/null > "$tmpcsv" || \
+	fail "Failed to run for plugin $testplug with output $output and all flags"
+
+    csvcompare "$tmpcsv" "$mypath/expected/$output-$flag.csv" || \
+	faildiff "Output differs from expected for output $output and all flags" "$tmpcsv" "$mypath/expected/$output-$flag.csv"
+
 done
 
 exit 0