Docs corrections around required 0- mark
[quincer.git] / test / 11suffix.test
blob6dcb367c5c9f21e5bccad75c1f276724b2aed90b
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 lead synth 1
15 pattern 132 0
16 A 57 80
17 e 64 80
18 a 69 80
19 0.'.'.'.S.
20 A aeAA| lead
21 EOF
23 ./lexdump $input >$output
24 [ $? = 0 ] || die
26 grep "ticks_per_beat: 2" $output || die
27 grep "beats_per_bar: 4" $output || die
29 (grep -A 34 "voice: lead" $output | grep "nbeats: 4") || die
30 (grep -A 34 "voice: lead" $output | grep "nevents: 10") || die
32 (grep -A 60 "voice: lead" $output | grep -A 5 "start: 2" | grep "byte 0: 144") || die
33 (grep -A 60 "voice: lead" $output | grep -A 5 "start: 2" | grep "byte 1: 57") || die
34 (grep -A 60 "voice: lead" $output | grep -A 5 "start: 2" | grep "byte 2: 80") || die
36 (grep -A 60 "voice: lead" $output | grep -A 5 "start: 3" | grep "byte 0: 128") || die
37 (grep -A 60 "voice: lead" $output | grep -A 5 "start: 3" | grep "byte 1: 57") || die
39 (grep -A 60 "voice: lead" $output | grep -A 5 "start: 6" | grep "byte 0: 144") || die
40 (grep -A 60 "voice: lead" $output | grep -A 5 "start: 6" | grep "byte 1: 69") || die
41 (grep -A 60 "voice: lead" $output | grep -A 5 "start: 6" | grep "byte 2: 80") || die
43 (grep -A 60 "voice: lead" $output | grep -A 5 "start: 7" | grep "byte 0: 128") || die
44 (grep -A 60 "voice: lead" $output | grep -A 5 "start: 7" | grep "byte 1: 69") || die
46 (grep -A 60 "voice: lead" $output | grep -A 5 "start: 7" | grep "byte 0: 144") || die
47 (grep -A 60 "voice: lead" $output | grep -A 5 "start: 7" | grep "byte 1: 64") || die
48 (grep -A 60 "voice: lead" $output | grep -A 5 "start: 7" | grep "byte 2: 80") || die
50 (grep -A 60 "voice: lead" $output | grep -A 5 "start: 8" | grep "byte 0: 128") || die
51 (grep -A 60 "voice: lead" $output | grep -A 5 "start: 8" | grep "byte 1: 64") || die
53 (grep -A 60 "voice: lead" $output | grep -A 5 "start: 8" | grep "byte 0: 144") || die
54 (grep -A 60 "voice: lead" $output | grep -A 5 "start: 8" | grep "byte 1: 57") || die
55 (grep -A 60 "voice: lead" $output | grep -A 5 "start: 8" | grep "byte 2: 80") || die
57 (grep -A 60 "voice: lead" $output | grep -A 5 "start: 9" | grep "byte 0: 128") || die
58 (grep -A 60 "voice: lead" $output | grep -A 5 "start: 9" | grep "byte 1: 57") || die
60 (grep -A 60 "voice: lead" $output | grep -A 5 "start: 9" | grep "byte 0: 144") || die
61 (grep -A 60 "voice: lead" $output | grep -A 5 "start: 9" | grep "byte 1: 57") || die
62 (grep -A 60 "voice: lead" $output | grep -A 5 "start: 9" | grep "byte 2: 80") || die
64 (grep -A 60 "voice: lead" $output | grep -A 5 "start: 10" | grep "byte 0: 128") || die
65 (grep -A 60 "voice: lead" $output | grep -A 5 "start: 10" | grep "byte 1: 57") || die
67 echo output was
68 cat $output
69 rm -f $input $output