Mercurial > hg > sonic-visualiser
comparison test/test-layer-exports.sh @ 2444:1b6a9c0484a3 spectrogram-export
Test export of zoomed 3d plot
author | Chris Cannam |
---|---|
date | Fri, 10 Jan 2020 10:53:22 +0000 |
parents | 935107f64e5f |
children | 048d9eed0a1f |
comparison
equal
deleted
inserted
replaced
2443:935107f64e5f | 2444:1b6a9c0484a3 |
---|---|
121 /exportlayer "$tmpdir/selected-peakfreq.csv" | 121 /exportlayer "$tmpdir/selected-peakfreq.csv" |
122 | 122 |
123 /setcurrent 4 3 | 123 /setcurrent 4 3 |
124 /exportlayer "$tmpdir/selected-notes.mid" | 124 /exportlayer "$tmpdir/selected-notes.mid" |
125 | 125 |
126 # If we also zoom in vertically in the 3d plot, our export should | |
127 # include only the zoomed area - check this | |
128 /setcurrent 5 2 | |
129 /zoomvertical 0 12 | |
130 /exportlayer "$tmpdir/selected-zoomed-3dplot.csv" | |
131 | |
126 /quit | 132 /quit |
127 EOF | 133 EOF |
128 | 134 |
129 "$sv" --no-splash --osc-script "$tmpdir/script" | 135 "$sv" --no-splash --osc-script "$tmpdir/script" |
130 | 136 |
150 echo | 156 echo |
151 fi | 157 fi |
152 done | 158 done |
153 done | 159 done |
154 | 160 |
161 for csv in selected-zoomed-3dplot.csv ; do | |
162 actual="$tmpdir/$csv" | |
163 expected="layers-expected/$csv" | |
164 if ! cmp -s "$actual" "$expected" ; then | |
165 echo | |
166 echo "Test failed for \"$csv\"!" | |
167 echo | |
168 echo "Actual:" | |
169 ls -l "$actual" | |
170 echo "Expected:" | |
171 ls -l "$expected" | |
172 echo | |
173 echo "Diff begins:" | |
174 diff -u1 "$actual" "$expected" | head | |
175 echo | |
176 fi | |
177 done | |
178 | |
155 for other in notes.mid selected-notes.mid ; do | 179 for other in notes.mid selected-notes.mid ; do |
156 actual="$tmpdir/$other" | 180 actual="$tmpdir/$other" |
157 expected="layers-expected/$other" | 181 expected="layers-expected/$other" |
158 if ! cmp -s "$actual" "$expected" ; then | 182 if ! cmp -s "$actual" "$expected" ; then |
159 echo | 183 echo |