diff tests/test-lab-writer/test-lab-writer.sh @ 206:704a8b27f3ed

Add & test the digits option in the Lab file writer
author Chris Cannam
date Tue, 03 Nov 2015 13:42:11 +0000
parents 237ccacbb85e
children e8f2f530c091
line wrap: on
line diff
--- a/tests/test-lab-writer/test-lab-writer.sh	Tue Nov 03 12:41:21 2015 +0000
+++ b/tests/test-lab-writer/test-lab-writer.sh	Tue Nov 03 13:42:11 2015 +0000
@@ -7,7 +7,7 @@
 
 trap "rm -f $tmplab" 0
 
-for output in notes-regions curve-vsr; do
+for output in notes-regions curve-vsr grid-oss; do
 
     flag=""
 
@@ -30,7 +30,7 @@
 # actually redundant, it's equivalent to -w csv --csv-separator '\t'
 # --csv-end-times --csv-omit-filename
 
-for output in notes-regions curve-vsr; do
+for output in notes-regions curve-vsr grid-oss; do
 
     flag=""
 
@@ -49,5 +49,17 @@
 	faildiff "Output differs from expected for CSV writer with output $output and $flag flag" "$tmplab" "$mypath/expected/$output-$flag.lab"
 done
 
+for output in grid-oss; do
+    for digits in 0 6 2; do
+
+	$r -d "$testplug:$output" -w lab --lab-stdout --lab-digits "$digits" "$infile" 2>/dev/null > "$tmplab" || \
+	    fail "Failed to run for plugin $testplug with output $output and digits $digits"
+
+	csvcompare "$tmplab" "$mypath/expected/$output-$digits.lab" || \
+	    faildiff "Output differs from expected for CSV writer with output $output and digits $digits" "$tmplab" "$mypath/expected/$output-$digits.lab"
+
+    done
+done
+
 exit 0