summaryrefslogtreecommitdiff
path: root/Build/source/texk/ttfdump/tests/ttfdump.test
blob: 3d10381e51e1d58efd60e7b6bd363dfdbf09830d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#! /bin/sh

# Copyright (C) 2011, 2012 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.

TEXMFCNF=$srcdir/../kpathsea
TTFONTS=$srcdir/tests
export TEXMFCNF TTFONTS

failed=

rm -rf FonetikaDaniaIwonaeRegular.ttf ttftest.*
cp $srcdir/tests/FonetikaDaniaIwonaeRegular.ttf .

./ttfdump -t glyf -g 1 -o ttftest.glyf FonetikaDaniaIwonaeRegular.ttf \
	&& diff -b $srcdir/tests/ttfdump.glyf ttftest.glyf \
	&& echo "ttfdump.glyf tests OK" \
	|| failed="$failed ttfdump.glyf"

./ttfdump -t GPOS -o ttftest.gpos FonetikaDaniaIwonaeRegular.ttf \
	&& diff -b $srcdir/tests/ttfdump.gpos ttftest.gpos \
	&& echo "ttfdump.gpos tests OK" \
	|| failed="$failed ttfdump.gpos"

./ttfdump -t GSUB -o ttftest.gsub FonetikaDaniaIwonaeRegular.ttf \
	&& diff -b $srcdir/tests/ttfdump.gsub ttftest.gsub \
	&& echo "ttfdump.gsub tests OK" \
	|| failed="$failed ttfdump.gsub"

./ttfdump -t head FonetikaDaniaIwonaeRegular.ttf > ttftest.head \
	&& diff -b $srcdir/tests/ttfdump.head ttftest.head \
	&& echo "ttfdump.head tests OK" \
	|| failed="$failed ttfdump.head"

test -z "$failed" && exit 0
echo "failed tests:$failed"
exit 1