summaryrefslogtreecommitdiff
path: root/Build/source/texk/ttfdump/tests/ttfdump.test
blob: f855abe182eaaa2c32f32cd9cba91a191be6603c (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#! /bin/sh -vx
# $Id$
# Copyright 2017 Karl Berry <tex-live@tug.org>
# Copyright 2011-2015 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 ttftest.*
#rm -rf FonetikaDaniaIwonaeRegular.ttf bad.otf test.ttc texmfhome.otf ttftest.*
#cp $srcdir/tests/FonetikaDaniaIwonaeRegular.ttf .
#cp $srcdir/tests/bad.otf .
#cp $srcdir/tests/test.ttc .
#cp $srcdir/tests/texmfhome.otf .

echo "*** ttfdump -t glyf -g 1 -o ttftest.glyf 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" && echo \
	|| failed="$failed ttfdump.glyf"

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

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

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

echo "*** ttfdump -t OS/2 texmfhome.otf >ttftest.os_2" \
        && ./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" && echo \
	|| failed="$failed ttfdump.os_2"

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

echo "*** ttfdump -t gasp -c 0 test.ttc >ttftest.gasp" \
	&& ./ttfdump -t gasp -c 0 test.ttc >ttftest.gasp \
	&& diff -b $srcdir/tests/ttfdump.gasp ttftest.gasp \
	&& echo "ttfdump.gasp tests OK" && echo \
	|| failed="$failed ttfdump.gasp"

echo "*** ttfdump -t maxp -c 1 test.ttc >ttftest.maxp" \
	&& ./ttfdump -t maxp -c 1 test.ttc >ttftest.maxp \
	&& diff -b $srcdir/tests/ttfdump.maxp ttftest.maxp \
	&& echo "ttfdump.maxp tests OK" && echo \
	|| failed="$failed ttfdump.maxp"

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