Fix an issue where the pattern doesn't advance,
[quincer.git] / test / 13namednoteabs.test
blob04389910ea859ebe6d43b10e0c20f247c6b73b52
1 #!/bin/sh
2 set -x
3 input=$(mktemp)
4 output=$(mktemp)
6 die() {
7 echo output was
8 cat $output
9 rm -f $input $output
10 exit 1
13 cat >$input <<EOF
14 voice keys amsynth 1
15 pattern 120 0
16 q b-1 80
17 w c 80
18 e g9 80
19 r A 80
21 t c-1 80
22 y A3 80
23 u A#6 80
24 i ab8 80
26 o D# 80
27 p d#3 80
28 h e# 80
29 j eb5 80
31 0...'...'...
32 qwertyuiophj| keys
33 EOF
35 ./lexdump $input >$output
36 [ $? = 0 ] || die
38 (grep -A 130 "voice: keys" $output | grep -A 5 "start: 0" | grep "byte 1: 11") || die
39 (grep -A 130 "voice: keys" $output | grep -A 5 "start: 1" | grep "byte 1: 12") || die
40 (grep -A 130 "voice: keys" $output | grep -A 5 "start: 2" | grep "byte 1: 127") || die
41 (grep -A 130 "voice: keys" $output | grep -A 5 "start: 3" | grep "byte 1: 117") || die
43 (grep -A 130 "voice: keys" $output | grep -A 5 "start: 4" | grep "byte 1: 0") || die
44 (grep -A 130 "voice: keys" $output | grep -A 5 "start: 5" | grep "byte 1: 57") || die
45 (grep -A 130 "voice: keys" $output | grep -A 5 "start: 6" | grep "byte 1: 94") || die
46 (grep -A 130 "voice: keys" $output | grep -A 5 "start: 7" | grep "byte 1: 116") || die
48 (grep -A 130 "voice: keys" $output | grep -A 5 "start: 8" | grep "byte 1: 111") || die
49 (grep -A 130 "voice: keys" $output | grep -A 5 "start: 9" | grep "byte 1: 51") || die
50 (grep -A 130 "voice: keys" $output | grep -A 5 "start: 10" | grep "byte 1: 53") || die
51 (grep -A 130 "voice: keys" $output | grep -A 5 "start: 11" | grep "byte 1: 75") || die
53 echo output was
54 cat $output
55 rm -f $input $output