5 if [[ $# -gt 0 ]]; then
8 ids=(`find data | grep '/===$' | cut -d/ -f2 | sort`)
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
21 if grep "$id" test/libyaml-emitter.skip >/dev/null; then
22 echo "ok $((++count)) # SKIP $label"
26 [[ -e $want ]] || want="$dir/in.yaml"
27 ./src/libyaml-emitter "$dir/test.event" > /tmp/test.out || {
34 output="$(${DIFF:-diff} -u $want /tmp/test.out)" || ok=false
36 echo "ok $((++count)) $label"
38 echo "not ok $((++count)) $label"
39 echo "$output" | sed 's/^/# /'