diff tests/test-midi-writer/test-midi-writer.sh @ 196:082c3f21f49e

Simple MIDI writer test
author Chris Cannam
date Tue, 01 Sep 2015 15:51:07 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-midi-writer/test-midi-writer.sh	Tue Sep 01 15:51:07 2015 +0100
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+. ../include.sh
+
+infile=$audiopath/20sec-silence.wav
+tmpmidi=$mypath/tmp_1_$$.mid
+
+trap "rm -f $tmpmidi" 0
+
+for output in notes-regions curve-vsr; do
+
+    flag=""
+
+    $r -d "$testplug:$output" -w midi --midi-one-file "$tmpmidi" --midi-force "$infile" 2>/dev/null || \
+	fail "Failed to run for plugin $testplug with output $output and no additional flags"
+
+    midicompare "$tmpmidi" "$mypath/expected/$output.mid" || \
+	faildiff_od "Output differs from expected for output $output" "$tmpmidi" "$mypath/expected/$output.mid"
+
+done
+
+exit 0
+