Mercurial > hg > sonic-annotator
diff tests/test-lab-writer/test-lab-writer.sh @ 159:237ccacbb85e labfile
Add omit-filename option to CSV writer (and test it while testing lab writer)
author | Chris Cannam |
---|---|
date | Wed, 15 Oct 2014 10:38:17 +0100 |
parents | 6dc824c3f5e1 |
children | 704a8b27f3ed |
line wrap: on
line diff
--- a/tests/test-lab-writer/test-lab-writer.sh Wed Oct 15 10:18:13 2014 +0100 +++ b/tests/test-lab-writer/test-lab-writer.sh Wed Oct 15 10:38:17 2014 +0100 @@ -26,5 +26,28 @@ faildiff "Output differs from expected for output $output and $flag flag" "$tmplab" "$mypath/expected/$output-$flag.lab" done +# Do it all over again, but using the CSV writer. The Lab writer is +# 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 + + flag="" + + $r -d "$testplug:$output" -w csv --csv-separator '\t' --csv-end-times --csv-omit-filename --csv-stdout "$infile" 2>/dev/null > "$tmplab" || \ + fail "Failed to run for plugin $testplug and CSV writer with output $output and no additional flags" + + csvcompare "$tmplab" "$mypath/expected/$output-no-flags.lab" || \ + faildiff "Output differs from expected for CSV writer with output $output and no additional flags" "$tmplab" "$mypath/expected/$output-no-flags.lab" + + flag=fill-ends + + $r -d "$testplug:$output" -w csv --csv-separator '\t' --csv-end-times --csv-omit-filename --csv-$flag --csv-stdout "$infile" 2>/dev/null > "$tmplab" || \ + fail "Failed to run for plugin $testplug and CSV writer with output $output and $flag flag" + + csvcompare "$tmplab" "$mypath/expected/$output-$flag.lab" || \ + faildiff "Output differs from expected for CSV writer with output $output and $flag flag" "$tmplab" "$mypath/expected/$output-$flag.lab" +done + exit 0