summaryrefslogtreecommitdiff
path: root/Build/source/texk/ttfdump/tests/ttfdump.test
blob: 7592eaea5b0aeb4d3404c0d25df0a4b8d58322e9 (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
39
40
41
42
43
44
45
46
47
48
49
50
#! /bin/sh

# Copyright (C) 2011-2013 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 texmfhome.otf ttftest.* bad.*
cp $srcdir/tests/FonetikaDaniaIwonaeRegular.ttf .
cp $srcdir/tests/texmfhome.otf .
cp $srcdir/tests/bad.otf .

./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"

./ttfdump -t OS/2 texmfhome.otf >ttftest.os_2 \
	&& diff -b $srcdir/tests/ttfdump.os_2 ttftest.os_2 \
	&& echo "ttfdump.os_2 tests OK" \
	|| failed="$failed ttfdump.os_2"

./ttfdump -t OS/2 bad.otf >ttftest.bad \
	&& diff -b $srcdir/tests/ttfdump.bad ttftest.bad \
	&& echo "ttfdump.bad tests OK" \
	|| failed="$failed ttfdump.bad"

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