#!/bin/sh -vx # $Id$ # Copyright 2019 Karl Berry # You may freely use, modify and/or distribute this file. cnf_dir=$srcdir/tests/cnfline # just in case they are set in the environment unset maxpr unset othervar # 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