Open mgkurtz opened 2 weeks ago
The expectation here was that engines are always on the path, so there's no question of a basename - how do you run your tool manually for an arbitrary file in your setup otherwise? (As in, not one in your development dir but just some test file somewhere on your system.)
how do you run your tool manually for an arbitrary file in your setup otherwise? (As in, not one in your development dir but just some test file somewhere on your system.)
Well, I can run l3build install
to install pdfjam
. Besides needing a symlink from ~/bin/pdfjam
to $TEXMFHOME/scripts/pdfjam/pdfjam
this works analogous to l3build install
for usual LaTeX packages.
Besides that, my “engines” are wrappers (lying in testfiles/support
) which I specifically wrote for testing only. So, I only ever call them as e.g. l3build check example5
. The test files consist of command line arguments only. E.g. example5.jam:
--nup 2x3 --frame true --noautoscale false --delta "0.2cm 0.3cm" --scale 0.95 beamer.pdf
I just thought that changing this issue from broken to working by issuing a simple
sed -i 's/"\." \.\. engine/"." .. basename(engine)/g' l3build-check.lua
seems fair enough. But of course that adds to the overall code and if you estimate that no one else needs this, we can also leave that as is. For now, I just use os.setenv
to add .
to PATH:
-- Set PATH for `l3build check` and `l3build save`
target_list.check.pre = function(_)
return os.setenv("PATH", os.getenv("PATH") .. ":.") and 0 or 1
end
target_list.save.pre = target_list.check.pre
So, I am fine either way.
I am currently adding some regression tests to
pdfjam
usingl3build
. Indeed this works pretty well and needs only those two lines inl3build.lua
:as long as
engine
lies in my searchPATH
.I would like this to work as well, if I put
engine
intestfiles/support
and usecheckengines = {"./engine"}
. Alas at several places inl3build-check.lua
, we compute a file name using"." .. engine
which leads to the errorThis should be avoidable by always using
"." .. basename(engine)
instead of"." .. engine
.