Debian Codegraph @

texk/dvipos/dvipos.test

raw
1 #! /bin/sh -vx
2 #
3 # Copyright 2021 TANAKA Takuji
4 # You may freely use, modify and/or distribute this file.
5
6 BinDir=${BinDir:-.}
7 ExeExt=${ExeExt:-}
8 _dvipos=$BinDir/dvipos$ExeExt
9
10 # pre-generated test results in the repository are stored in LF
11 # but the output might be written in CRLF on some platform.
12 # if 'diff --strip-trailing-cr' is available, exploit it.
13 # (useful for tests on win32 binaries run on MSYS shell)
14 DIFF="diff"
15 $DIFF --strip-trailing-cr $0 $0 \
16 && DIFF="diff --strip-trailing-cr" || echo
17
18 TEXMFCNF=$srcdir/../kpathsea
19 TFMFONTS="$srcdir/tests"
20 export TEXMFCNF TFMFONTS
21
22 ## play.dvi has no "pos:" specials
23 rm -rf play*.*
24 cp $srcdir/tests/play.dvi .
25 $_dvipos -b -o play.loc play.dvi || exit 1
26 diff play.loc $srcdir/tests/play.loc || exit 2
27
28 grep -v 'Processing_data_and_time' $srcdir/tests/play.pos > play_0.pos \
29 && grep -v 'Processing_data_and_time' play.pos > play_1.pos \
30 && $DIFF play_0.pos play_1.pos || exit 3
31