Disable graph drawing for reverse log order
[tig.git] / test / unit-test-graph.sh
blob5c8ec74cea258f5ab3f2f0dfd1b4a76624993c4f
1 #!/bin/bash
3 result=0
5 for in_file in test/test-graph-samples/*.in
6 do
7 out_file="${in_file%.*}.out"
8 diff_output=$(diff -C 1 "$out_file" <(cat $in_file | tools/test-graph 2> /dev/null))
9 if [ $? == 0 ]
10 then
11 echo "ok - Graph generated by $in_file matches $out_file"
12 else
13 echo "not ok - Graph generated by $in_file does not match $out_file"
14 echo "$diff_output" | sed "s/^/# /"
15 result=$(($result+1))
17 done
19 exit $result