mathml/config-pdf.lua

34 lines
951 B
Lua
Raw Normal View History

2021-10-31 16:06:29 +01:00
testfiledir = "testfiles-pdf"
checkengines = {"pdftex"}
stdengine = "pdftex"
checkruns = 3
test_types = test_types or {}
test_types.tml = {
test = '.xrt',
generated = '.tml',
reference = '.txr',
expectation = '.xre',
rewrite = function(source, result, engine, errlevels)
local file = assert(io.open(source,"rb"))
local content = string.gsub(file:read("*all") .. "\n","\r\n","\n")
file:close()
local new_content = content
-- local new_content = processor(content,...)
local newfile = io.open(result,"w")
newfile:write(new_content)
newfile:close()
end,
}
test_types.mml = {
test = '.mlt',
generated = '.tml',
reference = '.mlr',
expectation = '.mle',
rewrite = function(source, result, engine, errlevels)
return os.execute(string.format('texlua pdfmml.lua "%s" | tidy -xml -indent -wrap -quiet --output-file "%s" -', source, result))
end,
}
test_order = {'log', 'pdf', 'tml', 'mml'}