summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipos/dvipos.test
blob: 199b51620dfc0530753b0a6a714c6ddfc344fc67 (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
#! /bin/sh -vx
#
# Copyright 2021 TANAKA Takuji
# You may freely use, modify and/or distribute this file.

BinDir=${BinDir:-.}
ExeExt=${ExeExt:-}
_dvipos=$BinDir/dvipos$ExeExt

# pre-generated test results in the repository are stored in LF
# but the output might be written in CRLF on some platform.
# if 'diff --strip-trailing-cr' is available, exploit it.
# (useful for tests on win32 binaries run on MSYS shell)
DIFF="diff"
$DIFF --strip-trailing-cr $0 $0 \
  && DIFF="diff --strip-trailing-cr" || echo

TEXMFCNF=$srcdir/../kpathsea
TFMFONTS="$srcdir/tests"
export TEXMFCNF TFMFONTS

## play.dvi has no "pos:" specials
rm -rf play*.*
cp $srcdir/tests/play.dvi .
$_dvipos -b -o play.loc play.dvi || exit 1
diff play.loc $srcdir/tests/play.loc || exit 2

grep -v 'Processing_data_and_time' $srcdir/tests/play.pos > play_0.pos \
  && grep -v 'Processing_data_and_time' play.pos > play_1.pos \
  && $DIFF play_0.pos play_1.pos || exit 3