~ubuntu-branches/ubuntu/trusty/harfbuzz/trusty-proposed

« back to all changes in this revision

Viewing changes to test/shaping/run-tests.sh

  • Committer: Package Import Robot
  • Author(s): Emilio Pozuelo Monfort
  • Date: 2013-12-04 17:49:59 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20131204174959-go84s7f2wvd8umga
Tags: 0.9.24-2
* debian/control:
  + Add missing breaks/replaces on libharfbuzz0a.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
test "x$srcdir" = x && srcdir=.
 
4
test "x$builddir" = x && builddir=.
 
5
test "x$top_builddir" = x && top_builddir=../..
 
6
 
 
7
hb_shape=$top_builddir/util/hb-shape$EXEEXT
 
8
 
 
9
fails=0
 
10
 
 
11
if test $# = 0; then
 
12
        set /dev/stdin
 
13
fi
 
14
 
 
15
IFS=:
 
16
for f in "$@"; do
 
17
        echo "Running tests in $f"
 
18
        while read fontfile unicodes glyphs_expected; do
 
19
                echo "Testing $fontfile:$unicodes"
 
20
                glyphs=`$srcdir/hb-unicode-encode "$unicodes" | $hb_shape "$srcdir/$fontfile"`
 
21
                if ! test "x$glyphs" = "x$glyphs_expected"; then
 
22
                        echo "Actual:   $glyphs" >&2
 
23
                        echo "Expected: $glyphs_expected" >&2
 
24
                        let fails=$fails+1
 
25
                fi
 
26
        done < "$f"
 
27
done
 
28
 
 
29
if test $fails != 0; then
 
30
        echo "$fails tests failed."
 
31
        exit 1
 
32
else
 
33
        echo "All tests passed."
 
34
fi