New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add environment/macros to simplify testing fragile commands #375
Comments
The LaTeX3 approach is that everything should be fully-expandable or BTW, classes are a bit of an oddity at the moment: they are not 'really' right. |
BTW, I've literally just moved the test system to it's own repo: https://github.com/latex3/l3build |
The main reason is so that fragile content works (e.g. using \verbatim inside different environments). This is something where I actually have users who currently use savebox and similar tricks to be able to create the contents they want and use it later. In particular I have:
A secondary reason is that I created my own "tabular" like environment which basically aligns multiple tables to each other (and allows transposing rows and columns, the code is somewhat nuts to be honest). In that case it is just about added convenience to allow the user to use & and \ as separators. |
See http://sdaps.org/class-doc/sdapsarray.html for the extreme example (with an example of nested content in the last example of the page). |
I think a set of macros/environments like the following would be useful for me: https://gist.github.com/benzea/bd9aa91f827943f886ec51a2d2520c28 Then I could have multiple tests per file (one on each page) and only the page number should change if a new test is added to a file with multiple layout regression tests. But then, maybe I am doing everything wrong ;) |
Oh, forgot to mention earlier that I'll take a look over your links shortly (yes, I know my comment is out-of-logical-order as a result). |
I'll see what the rest of the team think: for the 2e tests we mainly just do more or less \begin{document}
\showoutput
<various fragile things>
\end{document} at least in part as the approach there pre-dates some of the structures in |
Yep, that works quite well. But I don't think it scales nicely if one tries to put multiple tests into a single file. In that case ideally the diff of the |
Since the build system can be (and is) used for plain TeX packages, we're not keen on using
(Actually I'm not too sure about the pagetest thing, why not just include
I haven't thought enough about |
Ignore the How about:
OMITPAGE had two reasons, but I think it is pointless with the above suggestion:
I have been playing with it and the environments work well for me and could be easily implemented with the macros as suggested by @blefloch (see here for a commit). |
I've set up an issue in the new |
I am working on a LaTeX 3 package (https://github.com/sdaps/sdaps-class) and would like to do regression testing using the proper LaTeX infrastructure. However, a number of commands I would like to test are fragile which means I cannot test certain corner cases inside the TEST macro definition.
It would be nice to have a TEST environment or e.g. BEGINTEST(/ENDTEST) macros to simplify testing fragile commands.
The text was updated successfully, but these errors were encountered: