Skip to content

Commit

Permalink
move script to auto generate files to build.lua and organize the test…
Browse files Browse the repository at this point in the history
…files
  • Loading branch information
Udi-Fogiel committed Apr 21, 2024
1 parent f59f494 commit dd80f0d
Show file tree
Hide file tree
Showing 804 changed files with 13,181 additions and 770 deletions.
37 changes: 36 additions & 1 deletion build.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module = "polyglossia"
stdengine = "xetex"
checkengines = {"xetex","luatex"}
checkruns = 2
checkconfigs = {"build","config-lua"}
checkconfigs = {"build","configfiles/config-lua","configfiles/config-autogen"}
sourcefiledir = "tex"
docfiledir = "doc"
sourcefiles = {"*.def", "*.ldf", "*.sty", "*.lua", "**/*.map"}
Expand Down Expand Up @@ -54,3 +54,38 @@ function update_tag(file,content,tagname,tagdate)
end
return content
end

function gen_test_from_gloss()
local testdoc = [[
\input{regression-test.tex}
\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{%s}
\begin{document}
\day=6
\month=8
\year=2012
\setbox0=\hbox{\today.}
\START\showbox0\END
]]
local gloss_files = filelist("./tex", "gloss-*.ldf")
for file = 1, #gloss_files do
local file_name = gloss_files[file]
local gloss_name = jobname(file_name)
local language = gloss_name:sub(7)
if fileexists('testfiles/test-gloss-' .. language .. '.lvt') and
not false then else -- change to true to overwrite existing tests
f = io.open('testfiles/test-gloss-' .. language .. '.lvt', 'w')
f:write(string.format(testdoc, language))
f:close()
print(language .. ": " .. file .. "/" .. #gloss_files)
run('.', 'l3build save test-gloss-' .. language)
run('.', 'l3build save -e luatex test-gloss-' .. language)
end end
return 0
end

--option_list["force"] = { desc = "overwrite existing tests with gentest", -- does not work... why?
-- type = "boolean"}
target_list["gentest"] = { func = gen_test_from_gloss,
desc = "generate minimal test files from gloss fies"}
2 changes: 2 additions & 0 deletions configfiles/config-autogen.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
testfiledir = "testfiles/autogen"
checkruns = 1
2 changes: 1 addition & 1 deletion config-lua.lua → configfiles/config-lua.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
stdengine = "luatex"
checkengines = {"luatex"}
testfiledir = "testfiles-lua"
testfiledir = "testfiles/luatex"
3 changes: 3 additions & 0 deletions configfiles/config-xetex.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
stdengine = "xetex"
checkengines = {"xetex"}
testfiledir = "testfiles/xetex"
Empty file.
11 changes: 11 additions & 0 deletions testfiles/autogen/test-gloss-acadien.lvt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
\input{regression-test.tex}
\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{acadien}
\begin{document}
\day=6
\month=8
\year=2012
\setbox0=\hbox{\today.}
\START\showbox0\END

Empty file.
22 changes: 22 additions & 0 deletions testfiles/autogen/test-gloss-aeb.luatex.tlg
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
> \box...=
\hbox(6.66+0.22)x42.84001, direction TRT
.\TU/lmr/m/n/10 6
.\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
.\TU/lmr/m/n/10 أ
.\TU/lmr/m/n/10 󰀀
.\TU/lmr/m/n/10 و
.\TU/lmr/m/n/10 󰀀
.\TU/lmr/m/n/10 ت
.\TU/lmr/m/n/10 󰀀
.\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
.\TU/lmr/m/n/10 2
.\TU/lmr/m/n/10 0
.\TU/lmr/m/n/10 1
.\TU/lmr/m/n/10 2
.\TU/lmr/m/n/10 .
! OK.
<to be read again>
\begingroup
l. ...\START\showbox0\END
11 changes: 11 additions & 0 deletions testfiles/autogen/test-gloss-aeb.lvt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
\input{regression-test.tex}
\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{aeb}
\begin{document}
\day=6
\month=8
\year=2012
\setbox0=\hbox{\today.}
\START\showbox0\END

13 changes: 13 additions & 0 deletions testfiles/autogen/test-gloss-aeb.tlg
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
> \box...=
\hbox(6.66+0.21999)x42.84
.\TU/lmr/m/n/10 6
.\glue 3.33 plus 1.665 minus 1.11
.\TU/lmr/m/n/10 أوت
.\glue 3.33 plus 1.665 minus 1.11
.\TU/lmr/m/n/10 2012.
! OK.
<to be read again>
\begingroup
l. ...\START\showbox0\END
30 changes: 30 additions & 0 deletions testfiles/autogen/test-gloss-af.luatex.tlg
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
> \box...=
\hbox(7.16+2.06)x75.11, direction TLT
.\TU/lmr/m/n/10 6
.\penalty 10000
.\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
.\TU/lmr/m/n/10 A
.\kern-0.28 (font)
.\TU/lmr/m/n/10 u
.\discretionary (penalty 50)
..< \TU/lmr/m/n/10 -
.\TU/lmr/m/n/10 g
.\TU/lmr/m/n/10 u
.\TU/lmr/m/n/10 s
.\discretionary (penalty 50)
..< \TU/lmr/m/n/10 -
.\TU/lmr/m/n/10 t
.\TU/lmr/m/n/10 u
.\TU/lmr/m/n/10 s
.\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
.\TU/lmr/m/n/10 2
.\TU/lmr/m/n/10 0
.\TU/lmr/m/n/10 1
.\TU/lmr/m/n/10 2
.\TU/lmr/m/n/10 .
! OK.
<to be read again>
\begingroup
l. ...\START\showbox0\END
11 changes: 11 additions & 0 deletions testfiles/autogen/test-gloss-af.lvt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
\input{regression-test.tex}
\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{af}
\begin{document}
\day=6
\month=8
\year=2012
\setbox0=\hbox{\today.}
\START\showbox0\END

14 changes: 14 additions & 0 deletions testfiles/autogen/test-gloss-af.tlg
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
> \box...=
\hbox(7.16+2.05998)x75.11
.\TU/lmr/m/n/10 6
.\penalty 10000
.\glue 3.33 plus 1.665 minus 1.11
.\TU/lmr/m/n/10 Augustus
.\glue 3.33 plus 1.665 minus 1.11
.\TU/lmr/m/n/10 2012.
! OK.
<to be read again>
\begingroup
l. ...\START\showbox0\END
35 changes: 35 additions & 0 deletions testfiles/autogen/test-gloss-afb.luatex.tlg
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
> \box...=
\hbox(1.06+0.0)x37.44003, direction TRT
.\begindir TLT
.\TU/lmr/m/n/10 ٦
.\TU/lmr/m/n/10 󰀀
.\enddir TLT
.\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
.\TU/lmr/m/n/10 أ
.\TU/lmr/m/n/10 󰀀
.\TU/lmr/m/n/10 غ
.\TU/lmr/m/n/10 󰀀
.\TU/lmr/m/n/10 س
.\TU/lmr/m/n/10 󰀀
.\TU/lmr/m/n/10 ط
.\TU/lmr/m/n/10 󰀀
.\TU/lmr/m/n/10 س
.\TU/lmr/m/n/10 󰀀
.\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
.\begindir TLT
.\TU/lmr/m/n/10 ٢
.\TU/lmr/m/n/10 󰀀
.\TU/lmr/m/n/10 ٠
.\TU/lmr/m/n/10 󰀀
.\TU/lmr/m/n/10 ١
.\TU/lmr/m/n/10 󰀀
.\TU/lmr/m/n/10 ٢
.\TU/lmr/m/n/10 󰀀
.\enddir TLT
.\TU/lmr/m/n/10 .
! OK.
<to be read again>
\begingroup
l. ...\START\showbox0\END
11 changes: 11 additions & 0 deletions testfiles/autogen/test-gloss-afb.lvt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
\input{regression-test.tex}
\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{afb}
\begin{document}
\day=6
\month=8
\year=2012
\setbox0=\hbox{\today.}
\START\showbox0\END

18 changes: 18 additions & 0 deletions testfiles/autogen/test-gloss-afb.tlg
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
> \box...=
\hbox(1.06+0.0)x37.44
.\beginL
.\TU/lmr/m/n/10 ٦
.\endL
.\glue 3.33 plus 1.665 minus 1.11
.\TU/lmr/m/n/10 أغسطس
.\glue 3.33 plus 1.665 minus 1.11
.\beginL
.\TU/lmr/m/n/10 ٢٠١٢
.\endL
.\TU/lmr/m/n/10 .
! OK.
<to be read again>
\begingroup
l. ...\START\showbox0\END
30 changes: 30 additions & 0 deletions testfiles/autogen/test-gloss-afrikaans.luatex.tlg
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
> \box...=
\hbox(7.16+2.06)x75.11, direction TLT
.\TU/lmr/m/n/10 6
.\penalty 10000
.\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
.\TU/lmr/m/n/10 A
.\kern-0.28 (font)
.\TU/lmr/m/n/10 u
.\discretionary (penalty 50)
..< \TU/lmr/m/n/10 -
.\TU/lmr/m/n/10 g
.\TU/lmr/m/n/10 u
.\TU/lmr/m/n/10 s
.\discretionary (penalty 50)
..< \TU/lmr/m/n/10 -
.\TU/lmr/m/n/10 t
.\TU/lmr/m/n/10 u
.\TU/lmr/m/n/10 s
.\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
.\TU/lmr/m/n/10 2
.\TU/lmr/m/n/10 0
.\TU/lmr/m/n/10 1
.\TU/lmr/m/n/10 2
.\TU/lmr/m/n/10 .
! OK.
<to be read again>
\begingroup
l. ...\START\showbox0\END
11 changes: 11 additions & 0 deletions testfiles/autogen/test-gloss-afrikaans.lvt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
\input{regression-test.tex}
\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{afrikaans}
\begin{document}
\day=6
\month=8
\year=2012
\setbox0=\hbox{\today.}
\START\showbox0\END

14 changes: 14 additions & 0 deletions testfiles/autogen/test-gloss-afrikaans.tlg
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
> \box...=
\hbox(7.16+2.05998)x75.11
.\TU/lmr/m/n/10 6
.\penalty 10000
.\glue 3.33 plus 1.665 minus 1.11
.\TU/lmr/m/n/10 Augustus
.\glue 3.33 plus 1.665 minus 1.11
.\TU/lmr/m/n/10 2012.
! OK.
<to be read again>
\begingroup
l. ...\START\showbox0\END
23 changes: 23 additions & 0 deletions testfiles/autogen/test-gloss-albanian.luatex.tlg
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
> \box...=
\hbox(7.05+0.22)x60.96, direction TLT
.\TU/lmr/m/n/10 6
.\penalty 10000
.\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
.\TU/lmr/m/n/10 G
.\TU/lmr/m/n/10 u
.\TU/lmr/m/n/10 s
.\TU/lmr/m/n/10 h
.\kern-0.28 (font)
.\TU/lmr/m/n/10 t
.\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
.\TU/lmr/m/n/10 2
.\TU/lmr/m/n/10 0
.\TU/lmr/m/n/10 1
.\TU/lmr/m/n/10 2
.\TU/lmr/m/n/10 .
! OK.
<to be read again>
\begingroup
l. ...\START\showbox0\END
11 changes: 11 additions & 0 deletions testfiles/autogen/test-gloss-albanian.lvt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
\input{regression-test.tex}
\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{albanian}
\begin{document}
\day=6
\month=8
\year=2012
\setbox0=\hbox{\today.}
\START\showbox0\END

14 changes: 14 additions & 0 deletions testfiles/autogen/test-gloss-albanian.tlg
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
> \box...=
\hbox(7.05+0.21999)x60.96
.\TU/lmr/m/n/10 6
.\penalty 10000
.\glue 3.33 plus 1.665 minus 1.11
.\TU/lmr/m/n/10 Gusht
.\glue 3.33 plus 1.665 minus 1.11
.\TU/lmr/m/n/10 2012.
! OK.
<to be read again>
\begingroup
l. ...\START\showbox0\END
23 changes: 23 additions & 0 deletions testfiles/autogen/test-gloss-am.luatex.tlg
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
> \box...=
\hbox(6.77+0.22)x47.84001, direction TLT
.\TU/lmr/m/n/10 ሐ
.\TU/lmr/m/n/10 󰀀
.\TU/lmr/m/n/10 ም
.\TU/lmr/m/n/10 󰀀
.\TU/lmr/m/n/10 ሌ
.\TU/lmr/m/n/10 󰀀
.\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
.\TU/lmr/m/n/10 3
.\TU/lmr/m/n/10 0
.\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
.\TU/lmr/m/n/10 2
.\TU/lmr/m/n/10 0
.\TU/lmr/m/n/10 0
.\TU/lmr/m/n/10 4
.\TU/lmr/m/n/10 .
! OK.
<to be read again>
\begingroup
l. ...\START\showbox0\END
11 changes: 11 additions & 0 deletions testfiles/autogen/test-gloss-am.lvt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
\input{regression-test.tex}
\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{am}
\begin{document}
\day=6
\month=8
\year=2012
\setbox0=\hbox{\today.}
\START\showbox0\END

Loading

0 comments on commit dd80f0d

Please sign in to comment.