]> andersk Git - libyaml.git/blame - tests/run-test-suite/test/libyaml-parser.t
Rewrite make test-suite
[libyaml.git] / tests / run-test-suite / test / libyaml-parser.t
CommitLineData
a672b071
IN
1#!/usr/bin/env bash
2
3set -e
4
5if [[ $# -gt 0 ]]; then
6 ids=("$@")
7else
c9878e19 8 ids=($(cut -d: -f1 < test/libyaml-parser.list))
a672b071
IN
9fi
10
11count=0
12for id in "${ids[@]}"; do
13 dir="data/$id"
14 label="$id: $(< $dir/===)"
15 [[ -e "$dir/in.yaml" ]] || continue
e5aadc73 16 ../../tests/run-parser-test-suite "$dir/in.yaml" > /tmp/test.out || {
a672b071
IN
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
30done
31
32echo "1..$count"
This page took 0.103593 seconds and 5 git commands to generate.