summaryrefslogtreecommitdiff
path: root/Build/source/texk/kpathsea/tests
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-08-06 23:33:17 +0000
committerKarl Berry <karl@freefriends.org>2019-08-06 23:33:17 +0000
commit48f9e4b1f4dfaf9bfb9dcb935ea1c3d39cf9c779 (patch)
tree50d9db5039167e5778005ba82a7cba229db6fe43 /Build/source/texk/kpathsea/tests
parentc7ce5ab1655e5a4cc880ef2ac2eba601ce4109c2 (diff)
new cross-engine (and kpsewhich) option --cnf-line
git-svn-id: svn://tug.org/texlive/trunk@51830 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea/tests')
-rwxr-xr-xBuild/source/texk/kpathsea/tests/cnfline.test27
-rw-r--r--Build/source/texk/kpathsea/tests/cnfline/texmf.cnf5
2 files changed, 32 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
diff --git a/Build/source/texk/kpathsea/tests/cnfline/texmf.cnf b/Build/source/texk/kpathsea/tests/cnfline/texmf.cnf
new file mode 100644
index 00000000000..164f25744f5
--- /dev/null
+++ b/Build/source/texk/kpathsea/tests/cnfline/texmf.cnf
@@ -0,0 +1,5 @@
+# $Id$
+# Public domain. This tiny texmf.cnf is for kpathsea/tests/cnfline.test.
+maxpr=100
+maxpr.kpsewhich=200
+othervar=300