blob: 4374406d2c799188685b1e38b764b41762c0d168 (
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
|
#! /bin/sh -vx
# $Id$
# Copyright 2017 Karl Berry <tex-live@tug.org>
# Copyright 2009 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.
BinDir=${BinDir:-.}
ExeExt=${ExeExt:-}
_dt2dv=$BinDir/dt2dv$ExeExt
_dv2dt=$BinDir/dv2dt$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
# check whether the binaries are Windows exe or not
run_stdio_test=${run_stdio_test:-1}
if [ "$ExeExt" = ".exe" ]; then
echo "*** We assume EXE on Windows."
run_stdio_test=0
fi
rc=0
$_dt2dv $srcdir/edited.txt testfile.dvi || rc=1
$_dv2dt testfile.dvi testfile.dtl || rc=2
$_dt2dv testfile.dtl testfile.dvx || rc=3
$_dv2dt testfile.dvx testfile.dtx || rc=4
cmp testfile.dvi testfile.dvx || rc=5
diff testfile.dtl testfile.dtx || rc=6
$_dt2dv -so testfile.dtl > testfile1.dvi || rc=7
$_dt2dv -si testfile2.dvi < testfile.dtl || rc=8
$_dt2dv -so -si < testfile.dtl > testfile3.dvi || rc=9
cmp testfile.dvi testfile1.dvi || rc=10
cmp testfile.dvi testfile2.dvi || rc=11
cmp testfile.dvi testfile3.dvi || rc=12
if [ "$run_stdio_test" -gt 0 ]; then
$_dv2dt < testfile.dvi > testfile1.dtl || rc=13
cat testfile.dvi | $_dv2dt > testfile2.dtl || rc=14
$DIFF testfile.dtl testfile1.dtl || rc=15
$DIFF testfile.dtl testfile2.dtl || rc=16
else
echo dti with stdin and stdout tests **SKIPPED**
fi
exit $rc
|