You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To test the visual output of a macro, we need to see the PDF to accept or reject a test.
As far as I know, at the moment, if I use for example l3build save test1, I have to open build/test/test1.pdf by hand. It would be very useful to have an option like l3build save --pdf test1 that opens the PDF file if it exists.
This new feature should be customizable inside the build.lua file, such as to indicate the tool used in the command line launched. For example, on macOS, the command open build/test/test1.pdf works, but this would fail on most Linux OS.
The text was updated successfully, but these errors were encountered:
I like the feature but maybe it needs a bit though how to best inferface that. Maybe --view and some variable to set the view command if necessary (with some defaults based on default save engine and platform?
I guess my immediate thought is 'does this go with save'? That, well, changes the .tlg, which if you are not sure it's right seems a bit odd. I'd imagine more it goes with check , but when only one engine is in use (also one test?):
l3build check --view foo
Perhaps if given without --engine we assume that the standard engine is required? And if --engine is given, we use only the first name?
What about just adding a view option like l3build view foo. This could be implemented like this when launching the l3build.lua relatively its dir:
-- TOY CODE: do not use it in serious live! :-)VIEW_TAG="view"functionviewPDF(xtra_args)
ifxtra_args==nilor#xtra_args~=1thenprint("One single test file name needed!")
return1endtestfilename=xtra_args[1]
pdffile="build/test/" ..testfilename..".pdf"iffileexists(pdffile) ==falsethenprint("No PDF file found.\nSee: " ..pdffile)
return1end-- Works on MacOS, but not on Linux.trycmd=run(".", "open " ..'"' ..pdffile..'"')
iftrycmd~=0thenprint("No command to open PDF files.\nSee: " ..pdffile)
endreturn0endtarget_list[VIEW_TAG] = {
func=viewPDF,
desc="Open a PDF of tested files",
-- pre = function(xtra_args)-- end
}
A serious API could work like this.
The user can specify a command used to open a PDF.
If no command is specified, we can print the PDF path if the file exists. This can be useful in iterm2, for example, which allows clicking on path to open the associated dir or file.
It remains to build more seriously the PDF file path by respecting the user setting.
To test the visual output of a macro, we need to see the PDF to accept or reject a test.
As far as I know, at the moment, if I use for example
l3build save test1
, I have to openbuild/test/test1.pdf
by hand. It would be very useful to have an option likel3build save --pdf test1
that opens thePDF
file if it exists.This new feature should be customizable inside the
build.lua
file, such as to indicate the tool used in the command line launched. For example, on macOS, the commandopen build/test/test1.pdf
works, but this would fail on most Linux OS.The text was updated successfully, but these errors were encountered: