| 1 |
#! /bin/sh -vx |
| 2 |
# $Id: test-dvips.test 45809 2017-11-15 00:36:56Z karl $ |
| 3 |
# Public domain. Originally written 2010, Karl Berry. |
| 4 |
# Check that afm2tfm functions. |
| 5 |
# |
| 6 |
# BTW, to run just this test on its own: |
| 7 |
# make -C $wp TESTS=test-afm2tfm.test check |
| 8 |
# where wp=.../Work/texk/dvipsk |
| 9 |
|
| 10 |
BinDir=${BinDir:-.} |
| 11 |
ExeExt=${ExeExt:-} |
| 12 |
_afm2tfm=$BinDir/afm2tfm$ExeExt |
| 13 |
|
| 14 |
test_file=afmtest.afm |
| 15 |
test_dir=$srcdir/../tests/texmf |
| 16 |
test_input=$test_dir/$test_file |
| 17 |
if test ! -r "$test_input"; then # probably srcdir messed up |
| 18 |
echo "$0: goodbye, cannot find test input: $test_input" >&2 |
| 19 |
exit 1 |
| 20 |
fi |
| 21 |
|
| 22 |
AFMFONTS=$test_dir; export AFMFONTS |
| 23 |
|
| 24 |
# run afm2tfm, assumed on $test_file so we can check the output. |
| 25 |
do_check () { |
| 26 |
if "$@"; then :; else |
| 27 |
echo "$0: "$@" "$test_file" failed, goodbye." >&2 |
| 28 |
exit 1 |
| 29 |
fi |
| 30 |
|
| 31 |
tfm=`basename "$test_file" .afm`.tfm |
| 32 |
if test ! -s "$tfm"; then |
| 33 |
echo "$0: tfm empty or not created, goodbye." >&2 |
| 34 |
ls -l "$tfm" >&2 |
| 35 |
exit 1 |
| 36 |
fi |
| 37 |
|
| 38 |
# could run tftopl, but let's not assume it. |
| 39 |
} |
| 40 |
|
| 41 |
do_check $_afm2tfm "$test_file" |
| 42 |
do_check $_afm2tfm "$test_file" -p $srcdir/testdata/8r.enc # options after |
| 43 |
|
| 44 |
exit 0 |