[latex3-commits] [l3svn] branch master updated: l3build: Hard-code max_print_line
noreply at latex-project.org
noreply at latex-project.org
Sat Jan 2 23:15:08 CET 2016
This is an automated email from the git hooks/post-receive script.
joseph pushed a commit to branch master
in repository l3svn.
The following commit(s) were added to refs/heads/master by this push:
new 22e9f72 l3build: Hard-code max_print_line
22e9f72 is described below
commit 22e9f728ed2db9555a548ad63d1ac0d5e889f2a0
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Sat Jan 2 22:14:28 2016 +0000
l3build: Hard-code max_print_line
This avoids the issue that otherwise results could be
system-dependent. (Was originally r6352.)
---
l3build/l3build.dtx | 1 +
l3build/l3build.lua | 12 +++++-------
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/l3build/l3build.dtx b/l3build/l3build.dtx
index 9ad1f80..1140927 100644
--- a/l3build/l3build.dtx
+++ b/l3build/l3build.dtx
@@ -154,6 +154,7 @@
\luavarseparator
\luavarset{asciiengines}{\{"pdftex"\}}{Engines which should log as sure ASCII}
\luavarset{checkruns} {1} {How many times to run a check file before comparing the log.}
+\luavarset{maxprintline}{79} {Length of line to use in log files.}
\luavarset{packtdszip} {false} {Build a TDS-style zip file for CTAN?}
\luavarset{scriptname} {"build.lua"} {Name of script used in dependencies.}
\luavarset{typesetcmds} {""} {Instructions to be passed to \TeX{} when doing typesetting.}
diff --git a/l3build/l3build.lua b/l3build/l3build.lua
index 82a1bec..cd3656c 100644
--- a/l3build/l3build.lua
+++ b/l3build/l3build.lua
@@ -149,6 +149,7 @@ makeindexopts = makeindexopts or ""
-- Other required settings
asciiengines = asciiengines or {"pdftex"}
checkruns = checkruns or 1
+maxprintline = maxprintline or 79
packtdszip = packtdszip or false -- Not actually needed but clearer
scriptname = scriptname or "build.lua" -- Script used in each directory
typesetcmds = typesetcmds or ""
@@ -726,10 +727,7 @@ end
-- Convert the raw log file into one for comparison/storage: keeps only
-- the 'business' part from the tests and removes system-dependent stuff
function formatlog(logfile, newfile, engine)
- -- Do this before using maxprintline to expoit scoping
- local kpse = require("kpse")
- kpse.set_program_name(engine)
- local maxprintline = tonumber(kpse.expand_var("$max_print_line"))
+ local maxprintline = maxprintline
if engine == "luatex" or engine == "luajittex" then
maxprintline = maxprintline + 1 -- Deal with an out-by-one error
end
@@ -983,9 +981,6 @@ function formatlualog(logfile, newfile)
-- Wrap some cases that can be picked out
-- In some places LuaTeX does use max_print_line, then we
-- get into issues with different wrapping approaches
- local kpse = require("kpse")
- kpse.set_program_name("luatex")
- local maxprintline = tonumber(kpse.expand_var("$max_print_line"))
if string.len(line) == maxprintline then
return "", line
elseif string.len(lastline) == maxprintline then
@@ -1177,6 +1172,9 @@ function runtest(name, engine, hide, ext)
-- Avoid spurious output from (u)pTeX
os_setenv .. " GUESS_INPUT_KANJI_ENCODING=0"
.. os_concat ..
+ -- Ensure lines are of a known length
+ os_setenv .. " max_print_line=" .. maxprintline
+ .. os_concat ..
realengine .. format .. " "
.. checkopts .. " " .. asciiopt .. lvtfile
.. (hide and (" > " .. os_null) or "")
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the latex3-commits
mailing list