]>
Commit | Line | Data |
---|---|---|
a672b071 IN |
1 | #!/bin/bash |
2 | ||
3 | got=$(mktemp) | |
4 | ||
5 | count=0 | |
6 | for test in test/*.yaml; do | |
7 | want=${test//.yaml/.events} | |
8 | label="Parsing '$test' equals '$want'" | |
9 | rc=0 | |
10 | ./libyaml-parser $test > $got || rc=$? | |
11 | if [[ $rc -ne 0 ]]; then | |
12 | echo "not ok $((++count)) - Error code $rc" | |
13 | continue | |
14 | fi | |
15 | rc=0 | |
16 | diff=$(diff -u $want $got) || rc=$? | |
17 | if [[ $rc -eq 0 ]]; then | |
18 | echo "ok $((++count)) - $label" | |
19 | else | |
20 | echo "not ok $((++count)) - $label" | |
21 | diff=${diff//$'\n'/$'\n'# } | |
22 | echo "# $diff" | |
23 | fi | |
24 | done | |
25 | ||
26 | echo "1..$count" |