]> andersk Git - libyaml.git/blob - tests/run-test-suite/test/libyaml-parser.t
Switch test-suite run list from black to whitelist
[libyaml.git] / tests / run-test-suite / test / libyaml-parser.t
1 #!/usr/bin/env bash
2
3 set -e
4
5 if [[ $# -gt 0 ]]; then
6   ids=("$@")
7 else
8   ids=($(cut -d: -f1 < test/libyaml-parser.list))
9 fi
10
11 count=0
12 for id in "${ids[@]}"; do
13   dir="data/$id"
14   label="$id: $(< $dir/===)"
15   [[ -e "$dir/in.yaml" ]] || continue
16   ./src/libyaml-parser "$dir/in.yaml" > /tmp/test.out || {
17     (
18       cat "$dir/in.yaml"
19       cat "$dir/test.event"
20     ) | sed 's/^/# /'
21   }
22   ok=true
23   output="$(${DIFF:-diff} -u $dir/test.event /tmp/test.out)" || ok=false
24   if $ok; then
25     echo "ok $((++count)) $label"
26   else
27     echo "not ok $((++count)) $label"
28     echo "$output" | sed 's/^/# /'
29   fi
30 done
31
32 echo "1..$count"
This page took 0.131069 seconds and 5 git commands to generate.