5 if [[ $# -gt 0 ]]; then
8 ids=($(cut -d: -f1 < test/libyaml-emitter.list))
11 # Some environments like on OS X, the shell resets the following vars, so we
12 # work around it like so:
13 export LD_LIBRARY_PATH="${MY_LD_LIBRARY_PATH:?}"
14 export DYLD_LIBRARY_PATH="${MY_LD_LIBRARY_PATH:?}"
17 for id in "${ids[@]}"; do
19 label="$id: $(< $dir/===)"
20 [[ -e "$dir/in.yaml" ]] || continue
22 [[ -e $want ]] || want="$dir/in.yaml"
23 ./src/libyaml-emitter "$dir/test.event" > /tmp/test.out || {
30 output="$(${DIFF:-diff} -u $want /tmp/test.out)" || ok=false
32 echo "ok $((++count)) $label"
34 echo "not ok $((++count)) $label"
35 echo "$output" | sed 's/^/# /'