From f1245013bf7e9d490b43d9b8bebd467b2c1d14cc Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Wed, 1 Nov 2017 12:06:59 +0200 Subject: [PATCH] [test] Run shaping tests with both ot and ft funcs --- test/shaping/run-tests.sh | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/test/shaping/run-tests.sh b/test/shaping/run-tests.sh index a7d331aa2..bb1ba80e8 100755 --- a/test/shaping/run-tests.sh +++ b/test/shaping/run-tests.sh @@ -27,18 +27,29 @@ for f in "$@"; do continue fi $reference || echo "hb-shape $fontfile $options --unicodes $unicodes" - glyphs=`$hb_shape "$srcdir/$fontfile" $options --unicodes "$unicodes"` + glyphs1=`$hb_shape --font-funcs=ft "$srcdir/$fontfile" $options --unicodes "$unicodes"` if test $? != 0; then - echo "hb-shape failed." >&2 + echo "hb-shape --font-funcs=ft failed." >&2 fails=$((fails+1)) #continue fi + glyphs2=`$hb_shape --font-funcs=ot "$srcdir/$fontfile" $options --unicodes "$unicodes"` + if test $? != 0; then + echo "hb-shape --font-funcs=ot failed." >&2 + fails=$((fails+1)) + #continue + fi + if ! test "x$glyphs1" = "x$glyphs2"; then + echo "FT funcs: $glyphs1" >&2 + echo "OT funcs: $glyphs2" >&2 + fails=$((fails+1)) + fi if $reference; then - echo "$fontfile:$options:$unicodes:$glyphs" + echo "$fontfile:$options:$unicodes:$glyphs1" continue fi - if ! test "x$glyphs" = "x$glyphs_expected"; then - echo "Actual: $glyphs" >&2 + if ! test "x$glyphs1" = "x$glyphs_expected"; then + echo "Actual: $glyphs1" >&2 echo "Expected: $glyphs_expected" >&2 fails=$((fails+1)) fi