| 1 |
#! /bin/sh -vx |
| 2 |
# $Id: dvi2tty.test 67876 2023-08-11 11:46:06Z takuji $ |
| 3 |
# Copyright 2017 Karl Berry <[email protected]> |
| 4 |
# Copyright 2010-2012 Peter Breitenlohner <[email protected]> |
| 5 |
# You may freely use, modify and/or distribute this file. |
| 6 |
|
| 7 |
BinDir=${BinDir:-.} |
| 8 |
ExeExt=${ExeExt:-} |
| 9 |
_dvi2tty=$BinDir/dvi2tty$ExeExt |
| 10 |
|
| 11 |
test_src=$srcdir/$DVI2TTY_TREE/test |
| 12 |
test_out=$srcdir/output |
| 13 |
|
| 14 |
unset DVI2TTY # nullify dvi2tty options (if any) |
| 15 |
|
| 16 |
rm -f *.out |
| 17 |
rc=0 |
| 18 |
|
| 19 |
$_dvi2tty $test_src/test.dvi >test.out && diff $test_out/test.tty test.out || rc=1 |
| 20 |
$_dvi2tty -c $test_src/test.dvi >testc.out && diff $test_out/testc.tty testc.out || rc=2 |
| 21 |
$_dvi2tty -s $test_src/test.dvi >tests.out && diff $test_out/tests.tty tests.out || rc=3 |
| 22 |
$_dvi2tty -u $test_src/test.dvi >testu.out && diff $test_out/testu.tty testu.out || rc=4 |
| 23 |
$_dvi2tty -Eu $test_src/test.dvi >testEu.out && diff $test_out/testEu.tty testEu.out || rc=6 |
| 24 |
|
| 25 |
|
| 26 |
$_dvi2tty $test_src/ligtest >ligtest.out && diff $test_out/ligtest.tty ligtest.out || rc=11 |
| 27 |
$_dvi2tty -u $test_src/ligtest >ligtestu.out && diff $test_out/ligtestu.tty ligtestu.out || rc=14 |
| 28 |
$_dvi2tty -Eu $test_src/ligtest >ligtestEu.out && diff $test_out/ligtestEu.tty ligtestEu.out || rc=16 |
| 29 |
|
| 30 |
|
| 31 |
$_dvi2tty $test_src/table.dvi >table.out && diff $test_out/table.tty table.out || rc=21 |
| 32 |
$_dvi2tty -c $test_src/table.dvi >tablec.out && diff $test_out/tablec.tty tablec.out || rc=22 |
| 33 |
$_dvi2tty -s $test_src/table.dvi >tables.out && diff $test_out/tables.tty tables.out || rc=23 |
| 34 |
$_dvi2tty -u $test_src/table.dvi >tableu.out && diff $test_out/tableu.tty tableu.out || rc=24 |
| 35 |
$_dvi2tty -u -C $test_src/table.dvi >tableuC.out && diff $test_out/tableuC.tty tableuC.out || rc=25 |
| 36 |
$_dvi2tty -Eu $test_src/table.dvi >tableEu.out && diff $test_out/tableEu.tty tableEu.out || rc=26 |
| 37 |
$_dvi2tty -Eu1 $test_src/table.dvi >tableEu1.out && diff $test_out/tableEu1.tty tableEu1.out || rc=27 |
| 38 |
$_dvi2tty -Eu -C $test_src/table.dvi >tableEuC.out && diff $test_out/tableEuC.tty tableEuC.out || rc=28 |
| 39 |
$_dvi2tty -Eu -a $test_src/table.dvi >tableEua.out && diff $test_out/tableEua.tty tableEua.out || rc=29 |
| 40 |
|
| 41 |
|
| 42 |
## CJK by pTeX / upTeX |
| 43 |
$_dvi2tty -A -Eu -w100 -o ptex1Eu.out $test_src/ptex1.dvi && diff $test_out/ptex1Eu.tty ptex1Eu.out || rc=34 |
| 44 |
$_dvi2tty -J -Eu -w100 -o ptex1EuJ.out $test_src/ptex1.dvi && diff $test_out/ptex1Eu.tty ptex1EuJ.out || rc=35 |
| 45 |
|
| 46 |
$_dvi2tty -U -Eu -w100 -o uptex1.out $test_src/uptex1.dvi && diff $test_out/uptex1.tty uptex1.out || rc=36 |
| 47 |
$_dvi2tty -J -Eu -w100 -o uptex1J.out $test_src/uptex1.dvi && diff $test_out/uptex1.tty uptex1J.out || rc=37 |
| 48 |
|
| 49 |
|
| 50 |
## different position of FNTDEF and NOP |
| 51 |
$_dvi2tty $test_src/fntdef0.dvi >fntdef0.out && diff $test_out/fntdef0.tty fntdef0.out || rc=41 |
| 52 |
$_dvi2tty $test_src/fntdef1.dvi >fntdef1.out && diff $test_out/fntdef0.tty fntdef1.out || rc=42 |
| 53 |
$_dvi2tty $test_src/fntdef2.dvi >fntdef2.out && diff $test_out/fntdef0.tty fntdef2.out || rc=43 |
| 54 |
$_dvi2tty $test_src/fntdef3.dvi >fntdef3.out && diff $test_out/fntdef0.tty fntdef3.out || rc=44 |
| 55 |
|
| 56 |
|
| 57 |
exit $rc |