Debian Codegraph @

texk/cjkutils/cefsconv.test

raw
1 #! /bin/sh -vx
2 # $Id: cefsconv.test 67910 2023-08-13 13:51:08Z takuji $
3 # Copyright 2017-2018 Karl Berry <[email protected]>
4 # Copyright 2011 Peter Breitenlohner <[email protected]>
5 # You may freely use, modify and/or distribute this file.
6
7 BinDir=${BinDir:-.}
8 ExeExt=${ExeExt:-}
9 _cefsconv=$BinDir/cefsconv$ExeExt
10 _sjisconv=$BinDir/sjisconv$ExeExt
11 _cefconv=$BinDir/cefconv$ExeExt
12
13 # pre-generated test results in the repository are stored in LF
14 # but the output might be written in CRLF on some platform.
15 # if 'diff --strip-trailing-cr' is available, exploit it.
16 # (useful for tests on win32 binaries run on MSYS shell)
17 DIFF="diff"
18 $DIFF --strip-trailing-cr $0 $0 \
19 && DIFF="diff --strip-trailing-cr" || echo
20
21 LC_ALL=C; export LC_ALL; LANGUAGE=C; export LANGUAGE
22
23 $_cefsconv <$srcdir/tests/cefsconv.tex >cefsconv.cjk \
24 && $DIFF cefsconv.cjk $srcdir/tests/cefsconv.cjk \
25 || exit 1
26
27 $_sjisconv <$srcdir/tests/cefsconv.tex | $_cefconv \
28 | sed 's/cefconv.*sjisconv/cefsconv/' >cefsconv.cjk \
29 && $DIFF cefsconv.cjk $srcdir/tests/cefsconv.cjk \
30 || exit 1
31
32 $_cefconv <$srcdir/tests/cefsconv.tex | $_sjisconv \
33 | sed 's/CJKpreproc.*CNSpreproc/CNSpreproc/;s/cefconv/cefsconv/' >cefsconv.cjk \
34 && $DIFF cefsconv.cjk $srcdir/tests/cefsconv.cjk \
35 || exit 1
36