l3build icon indicating copy to clipboard operation
l3build copied to clipboard

Cannot run tests if `lvt` file has spaces

Open siefkenj opened this issue 2 years ago • 6 comments

It appears that l3build save is not set up to run an lvt file with spaces in the name. It errors on the line

\input file with spaces.lvt

I am trying to write tests that work with \jobname when the jobname has spaces, so renaming my tests to not have spaces isn't an option.

siefkenj avatar Sep 24 '22 21:09 siefkenj

I'm happy to look at the the naming-of-tests issue, but I wouldn't expect you to use the name of the test file as part of the test. For example, we need to test spaces in names, UTF-8 non-ASCII chars, etc., and do that in a test that is called something like space-test with an auxiliary file which has the space in the name.

josephwright avatar Sep 25 '22 21:09 josephwright

@josephwright I am not quite sure what you mean. How would an auxiliary file affect \jobname?

siefkenj avatar Sep 25 '22 21:09 siefkenj

@siefkenj I mean that a test of something-with-filenames is not linked to 'jobname, it's just \input <whatever auxiliary file>; the setup is not intended to impart semantics to the names of the test files.

josephwright avatar Sep 25 '22 21:09 josephwright

@zauguin, @FrankMittelbach Opinions here?

josephwright avatar Nov 08 '22 20:11 josephwright

Personally I would just list it as a restriction on test file names. Sure one could guard the name everywhere but this is error prone and there isn't really a need for it (testing code with spaces in file names can easily be done by using your own file names (even those based on jobname) within the test.

FrankMittelbach avatar Nov 09 '22 09:11 FrankMittelbach

ok, if you really have a package that internally uses \jobname and you want to test how that package behaves with spaces inside \jobname, that wouldn't work out of the box. However, that is a very singular case and you could test for it with something like

\def\jobname{foo bar}
\usepackage{mypkg}

or the like.

FrankMittelbach avatar Nov 09 '22 09:11 FrankMittelbach