| 1 |
#!/bin/sh -vx |
| 2 |
# $Id: cnfprog.test 68082 2023-08-27 14:18:10Z takuji $ |
| 3 |
# Copyright 2019 Karl Berry <[email protected]> |
| 4 |
# You may freely use, modify and/or distribute this file. |
| 5 |
# Test strange program name qualifiers which should give warnings. |
| 6 |
|
| 7 |
BinDir=${BinDir:-.} |
| 8 |
ExeExt=${ExeExt:-} |
| 9 |
_kpsewhich=$BinDir/kpsewhich$ExeExt |
| 10 |
|
| 11 |
cnf_dir=$srcdir/tests/cnfprog |
| 12 |
|
| 13 |
# But for the rest, just use the environment, to keep things simpler. |
| 14 |
TEXMFCNF=$cnf_dir; export TEXMFCNF |
| 15 |
|
| 16 |
# Make sure we get expected values from the test texmf.cnf. |
| 17 |
errfile=cnfprog.err |
| 18 |
val=`$_kpsewhich "--cnf-line=TEXMFCNF=$cnf_dir" --var-value=noequals 2>$errfile` |
| 19 |
if [ "$ExeExt" = ".exe" ]; then val=`echo $val | sed -e 's/\\r//'`; fi |
| 20 |
|
| 21 |
# the vaiable should not have any value. |
| 22 |
test -z "$val" || exit 1 |
| 23 |
|
| 24 |
grep 'Empty program name qualifier' $errfile || exit 2 |
| 25 |
grep 'Unlikely character ;' $errfile || exit 3 |
| 26 |
grep 'Unlikely character \$' $errfile || exit 4 |
| 27 |
|
| 28 |
exit 0 |