3 test "x$srcdir" = x && srcdir=.
4 test "x$builddir" = x && builddir=.
5 test "x$top_builddir" = x && top_builddir=../..
7 hb_shape=$top_builddir/util/hb-shape$EXEEXT
12 if test "x$1" = x--reference; then
22 $reference || echo "Running tests in $f"
23 while IFS=: read fontfile options unicodes glyphs_expected; do
24 if echo "$fontfile" | grep -q '^#'; then
25 $reference || echo "Skipping $fontfile:$unicodes"
28 $reference || echo "Testing $fontfile:$unicodes"
29 glyphs=`$srcdir/hb-unicode-encode "$unicodes" | $hb_shape $options "$srcdir/$fontfile"`
31 echo "hb-shape failed." >&2
36 echo "$fontfile:$options:$unicodes:$glyphs"
39 if ! test "x$glyphs" = "x$glyphs_expected"; then
40 echo "Actual: $glyphs" >&2
41 echo "Expected: $glyphs_expected" >&2
47 if test $fails != 0; then
48 $reference || echo "$fails tests failed."
51 $reference || echo "All tests passed."