[latex3-commits] [l3svn] branch master updated: l3build: Hard-code max_print_line

noreply at latex-project.org noreply at latex-project.org
Fri Jan 1 21:37:46 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  c3052a5   l3build: Hard-code max_print_line
c3052a5 is described below

commit c3052a56e22ca56b6a38b6d239de26ff861cad7f
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Fri Jan 1 20:37:14 2016 +0000

    l3build: Hard-code max_print_line
    
    This avoids the issue that otherwise results could be
    system-dependent.
---
 l3build/l3build.dtx |    1 +
 l3build/l3build.lua |   11 +++++------
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/l3build/l3build.dtx b/l3build/l3build.dtx
index d1b46b4..701b7cb 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 1dad764..43163a4 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 ""
@@ -727,9 +728,7 @@ end
 -- 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
@@ -987,9 +986,6 @@ function formatlualog(logfile, newfile, engine)
     -- Wrap some cases that can be picked out:
     -- This deals with a few places that can be normalised plus
     -- the 'out by one' issue that LuaTeX has for some cases
-    local kpse = require("kpse")
-    kpse.set_program_name(engine)
-    local maxprintline = tonumber(kpse.expand_var("$max_print_line"))
     if string.len(line) == maxprintline then
       return "", lastline .. line
     -- Cover the out-by-one issue with LuaTeX
@@ -1189,6 +1185,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