summaryrefslogtreecommitdiff
path: root/Build/source/texk/kpathsea/tests/cnfline.test
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/kpathsea/tests/cnfline.test')
-rwxr-xr-xBuild/source/texk/kpathsea/tests/cnfline.test27
1 files changed, 27 insertions, 0 deletions
diff --git a/Build/source/texk/kpathsea/tests/cnfline.test b/Build/source/texk/kpathsea/tests/cnfline.test
new file mode 100755
index 00000000000..bffe8808b9d
--- /dev/null
+++ b/Build/source/texk/kpathsea/tests/cnfline.test
@@ -0,0 +1,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