| test "x$srcdir" = x && srcdir=. |
| test "x$builddir" = x && builddir=. |
| test "x$top_builddir" = x && top_builddir=../.. |
| hb_shape=$top_builddir/util/hb-shape$EXEEXT |
| if test "x$1" = x--reference; then |
| $reference || echo "Running tests in $f" |
| while read fontfile options unicodes glyphs_expected; do |
| $reference || echo "Testing $fontfile:$unicodes" |
| glyphs=`$srcdir/hb-unicode-encode "$unicodes" | $hb_shape $options "$srcdir/$fontfile"` |
| echo "hb-shape failed." >&2 |
| echo "$fontfile:$options:$unicodes:$glyphs" |
| if ! test "x$glyphs" = "x$glyphs_expected"; then |
| echo "Actual: $glyphs" >&2 |
| echo "Expected: $glyphs_expected" >&2 |
| if test $fails != 0; then |
| $reference || echo "$fails tests failed." |
| $reference || echo "All tests passed." |