summaryrefslogtreecommitdiff
path: root/Build/source/texk/kpathsea/tests/cnfline.test
blob: bffe8808b9d17eb54a8d060acce347198022b0ce (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
#!/bin/sh -vx
# $Id$
# Copyright 2019 Karl Berry <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.

cnf_dir=$srcdir/tests/cnfline

# Just for fun, let's first try the --cnf-line feature to set TEXMFCNF.
val=`./kpsewhich "--cnf-line=TEXMFCNF=$cnf_dir" --var-value=othervar`
test x"$val" = x300 || exit 1

# But for the rest, just use the environment, to keep things simpler.
TEXMFCNF=$cnf_dir; export TEXMFCNF

# Make sure we get expected values from the test texmf.cnf.
val=`./kpsewhich --var-value=maxpr`
test x"$val" = x200 || exit 1
#
val=`./kpsewhich --progname=foo --var-value=maxpr`
test x"$val" = x100 || exit 1
#
val=`./kpsewhich --var-value=othervar`
test x"$val" = x300 || exit 1

# Now override on cmd line -- both texmf.cnf values should get overridden.
val=`./kpsewhich --cnf-line=maxpr=99 --var-value=maxpr`
test x"$val" = x99 || exit 1