Skip to content

Commit

Permalink
update tests to test errors at loading time
Browse files Browse the repository at this point in the history
  • Loading branch information
Udi-Fogiel committed Apr 26, 2024
1 parent 8d760c6 commit efca3ed
Show file tree
Hide file tree
Showing 730 changed files with 14,765 additions and 724 deletions.
16 changes: 10 additions & 6 deletions build.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,28 +59,32 @@ function gen_test_from_gloss()
local testdoc = [[
\input{regression-test.tex}
\documentclass{article}
\AddToHook{package/bidi/before}{\let\xpgorigtypeout\typeout
\def\typeout#1{\let\typeout\xpgorigtypeout}}
\usepackage{polyglossia}
\START
\setmainlanguage{%s}
\OMIT
\begin{document}
\day=6
\month=8
\year=2012
\setbox0=\hbox{\today.}
\START\showbox0\END
\TIMO\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')
if fileexists('testfiles/autogen/test-gloss-' .. language .. '.lvt') and
not true then else -- change to true to overwrite existing tests
f = io.open('testfiles/autogen/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)
run('.', 'l3build save -cconfigfiles/config-autogen test-gloss-' .. language)
run('.', 'l3build save -e luatex -cconfigfiles/config-autogen test-gloss-' .. language)
end end
return 0
end
Expand Down
35 changes: 35 additions & 0 deletions testfiles/autogen/test-gloss-acadien.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.
(gloss-acadien.ldf
File: gloss-acadien.ldf polyglossia: module for Canadian (Acadian) French
(gloss-french.ldf
File: gloss-french.ldf polyglossia: module for French
Module polyglossia Info: Language data for french
(polyglossia) hyphenation^^I
(polyglossia) lefthyphenmin^^I2
(polyglossia) loader^^Iloadhyph-fr.tex
(polyglossia) patterns^^Ihyph-fr.pat.txt
(polyglossia) righthyphenmin^^I2
(polyglossia) synonyms^^Ipatois,francais on input line ...
Module polyglossia Info: Language french was not yet loaded; created with id 2 on input line ...
Lua-only attribute polyglossia_punct = 4
Inserting `polyglossia-punct.process' in `pre_linebreak_filter'.
Inserting `polyglossia-punct.process' in `hpack_filter'.
Package polyglossia Info: Option: French, variant=french
))
! Package polyglossia Error: Unknown direction
Type <return> to continue.
...
l. ...\setmainlanguage{acadien}
LaTeX does not know anything more about this error, sorry.
Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
! Undefined control sequence.
\__xpg_setRTLmain: ->\setRTLmain
l. ...\setmainlanguage{acadien}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Package polyglossia Info: Default language is
6 changes: 5 additions & 1 deletion testfiles/autogen/test-gloss-acadien.lvt
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
\input{regression-test.tex}
\documentclass{article}
\AddToHook{package/bidi/before}{\let\xpgorigtypeout\typeout
\def\typeout#1{\let\typeout\xpgorigtypeout}}
\usepackage{polyglossia}
\START
\setmainlanguage{acadien}
\OMIT
\begin{document}
\day=6
\month=8
\year=2012
\setbox0=\hbox{\today.}
\START\showbox0\END
\TIMO\showbox0\END

40 changes: 40 additions & 0 deletions testfiles/autogen/test-gloss-acadien.tlg
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
(gloss-acadien.ldf
File: gloss-acadien.ldf polyglossia: module for Canadian (Acadian) French
(gloss-french.ldf
File: gloss-french.ldf polyglossia: module for French
\french@openbrackets=\XeTeXcharclass1
\french@closebrackets=\XeTeXcharclass2
\french@questionexclamation=\XeTeXcharclass3
\french@punctthin=\XeTeXcharclass4
\french@punctthick=\XeTeXcharclass5
\french@punctguillstart=\XeTeXcharclass6
\french@punctguillend=\XeTeXcharclass7
Package polyglossia Info: Option: French, variant=french
))
! Package polyglossia Error: Unknown direction
Type <return> to continue.
...
l. ...\setmainlanguage{acadien}
LaTeX does not know anything more about this error, sorry.
Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
! Undefined control sequence.
\__xpg_setRTLmain: ->\@RTLmaintrue
\setnonlatin
l. ...\setmainlanguage{acadien}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
\__xpg_setRTLmain: ->\@RTLmaintrue \setnonlatin
l. ...\setmainlanguage{acadien}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Package polyglossia Info: Default language is
45 changes: 44 additions & 1 deletion testfiles/autogen/test-gloss-aeb.luatex.tlg
Original file line number Diff line number Diff line change
@@ -1,5 +1,48 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
(gloss-aeb.ldf
File: gloss-aeb.ldf polyglossia: module for aeb (Arabic)
(gloss-arabic.ldf
File: gloss-arabic.ldf polyglossia: module for Arabic
(../luabidi.sty
Package: luabidi ....-..-.. v... Bidirectional typesetting in LuaTeX
(../luabidi-footnotes.def
\footnoterulewidth=\skip...
)) (arabicnumbers.sty
Package: arabicnumbers ....-..-.. v... Formatting of Arabic and Farsi digits and of Arabic abjad numerals
) (hijrical.sty
Package: hijrical ....-..-.. v... Islamic calendar
(../calc.sty
Package: calc ....-..-.. v... Infix arithmetic (KKT,FJ)
\calc@Acount=\count...
\calc@Bcount=\count...
\calc@Adimen=\dimen...
\calc@Bdimen=\dimen...
\calc@Askip=\skip...
\calc@Bskip=\skip...
LaTeX Info: Redefining \setlength on input line ....
LaTeX Info: Redefining \addtolength on input line ....
\calc@Ccount=\count...
\calc@Cskip=\skip...
) (cal-util.def
\c@tmpA=\count...
\c@tmpB=\count...
\c@tmpC=\count...
\c@tmpD=\count...
\c@tmpE=\count...
\c@tmpF=\count...
)
\c@Hijriday=\count...
\c@Hijrimonth=\count...
\c@Hijriyear=\count...
)
Package polyglossia Info: Option: arabic, locale=default
Package polyglossia Info: Option: Arabic, calendar=gregorian
Package polyglossia Info: Option: Arabic, numerals=mashriq
))
Package polyglossia Info: Option: arabic, locale=tunisia
Package polyglossia Info: Default language is arabic
Package polyglossia Info: Option: arabic, locale=tunisia
> \box...=
\hbox(6.66+0.22)x42.84001, direction TRT
.\TU/lmr/m/n/10 6
Expand All @@ -19,4 +62,4 @@ Don't change this file in any respect.
! OK.
<to be read again>
\begingroup
l. ...\START\showbox0\END
l. ...\TIMO\showbox0\END
6 changes: 5 additions & 1 deletion testfiles/autogen/test-gloss-aeb.lvt
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
\input{regression-test.tex}
\documentclass{article}
\AddToHook{package/bidi/before}{\let\xpgorigtypeout\typeout
\def\typeout#1{\let\typeout\xpgorigtypeout}}
\usepackage{polyglossia}
\START
\setmainlanguage{aeb}
\OMIT
\begin{document}
\day=6
\month=8
\year=2012
\setbox0=\hbox{\today.}
\START\showbox0\END
\TIMO\showbox0\END

104 changes: 103 additions & 1 deletion testfiles/autogen/test-gloss-aeb.tlg
Original file line number Diff line number Diff line change
@@ -1,5 +1,107 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
(gloss-aeb.ldf
File: gloss-aeb.ldf polyglossia: module for aeb (Arabic)
(gloss-arabic.ldf
File: gloss-arabic.ldf polyglossia: module for Arabic
(../bidi.sty
Package: bidi ....-..-.. v... (Release Donald Ervin Knuth) Bidirectional typesetting in plain TeX and LaTeX
(../biditools.sty
Package: biditools ....-..-.. v... Programming tools for bidi package
\@bidi@envbody=\toks...
\@bidi@emptytoks=\toks...
\bidi@poscount=\count...
\bidi@tempcountb=\count...
\bidi@temptoksa=\toks...
\bidi@temptoksb=\toks...
\bidi@dummies=\count...
\bidi@are@these@correct=\toks...
\bidi@toks@lista=\toks...
\bidi@toks@listb=\toks...
\bidi@stack@length=\count...
\bidi@empty@stack=\toks...
\bidi@looprepeat@depth=\count...
) (../zref-abspage.sty
Package: zref-abspage ....-..-.. v... Module abspage for zref (HO)
(../zref-base.sty
Package: zref-base ....-..-.. v... Module base for zref (HO)
(../ltxcmds.sty
Package: ltxcmds ....-..-.. v... LaTeX kernel commands for general use (HO)
) (../infwarerr.sty
Package: infwarerr ....-..-.. v... Providing info/warning/error messages (HO)
) (../kvsetkeys.sty
Package: kvsetkeys ....-..-.. v... Key value parser (HO)
) (../kvdefinekeys.sty
Package: kvdefinekeys ....-..-.. v... Define keys (HO)
) (../pdftexcmds.sty
Package: pdftexcmds ....-..-.. v... Utility functions of pdfTeX for LuaTeX (HO)
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode not found.
) (../etexcmds.sty
Package: etexcmds ....-..-.. v... Avoid name clashes with e-TeX commands (HO)
) (../auxhook.sty
Package: auxhook ....-..-.. v... Hooks for auxiliary files (HO)
)
Package zref Info: New property list: main on input line ....
Package zref Info: New property: default on input line ....
Package zref Info: New property: page on input line ....
)
\c@abspage=\count...
Package zref Info: New property: abspage on input line ....
)
\@bidi@copyins@=\insert...
(../latex-xetex-bidi.def
File: latex-xetex-bidi.def ....-..-.. v... bidi adaptations for `latex.ltx' for XeTeX engine
\bidi@n@everypar=\toks...
\bidi@column@check@number=\count...
(../footnote-xetex-bidi.def
File: footnote-xetex-bidi.def ....-..-.. v... bidi footnote macros for XeTeX engine
\c@footdir@label=\count...
\footdir@toks=\toks...
) (../article-xetex-bidi.def
File: article-xetex-bidi.def ....-..-.. v... bidi adaptations for standard article class for XeTeX engine
)) (../loadingorder-xetex-bidi.def
File: loadingorder-xetex-bidi.def ....-..-.. v... making sure that bidi is the last package loaded
)
\bidi@digits=\count...
\bidi@digits@charclass=\XeTeXcharclass1
\bidi@sepmark@charclass=\XeTeXcharclass2
) (arabicnumbers.sty
Package: arabicnumbers ....-..-.. v... Formatting of Arabic and Farsi digits and of Arabic abjad numerals
) (hijrical.sty
Package: hijrical ....-..-.. v... Islamic calendar
(../calc.sty
Package: calc ....-..-.. v... Infix arithmetic (KKT,FJ)
\calc@Acount=\count...
\calc@Bcount=\count...
\calc@Adimen=\dimen...
\calc@Bdimen=\dimen...
\calc@Askip=\skip...
\calc@Bskip=\skip...
LaTeX Info: Redefining \setlength on input line ....
LaTeX Info: Redefining \addtolength on input line ....
\calc@Ccount=\count...
\calc@Cskip=\skip...
) (cal-util.def
\c@tmpA=\count...
\c@tmpB=\count...
\c@tmpC=\count...
\c@tmpD=\count...
\c@tmpE=\count...
\c@tmpF=\count...
)
\c@Hijriday=\count...
\c@Hijrimonth=\count...
\c@Hijriyear=\count...
)
Package polyglossia Info: Option: arabic, locale=default
Package polyglossia Info: Option: Arabic, calendar=gregorian
Package polyglossia Info: Option: Arabic, numerals=mashriq
))
Package polyglossia Info: Option: arabic, locale=tunisia
Package polyglossia Info: Default language is arabic
Package polyglossia Info: Option: arabic, locale=tunisia
> \box...=
\hbox(6.66+0.21999)x42.84
.\TU/lmr/m/n/10 6
Expand All @@ -10,4 +112,4 @@ Don't change this file in any respect.
! OK.
<to be read again>
\begingroup
l. ...\START\showbox0\END
l. ...\TIMO\showbox0\END
21 changes: 20 additions & 1 deletion testfiles/autogen/test-gloss-af.luatex.tlg
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
(gloss-af.ldf
File: gloss-af.ldf polyglossia: module for af (Afrikaans)
(gloss-afrikaans.ldf
File: gloss-afrikaans.ldf polyglossia: module for Afrikaans
Module polyglossia Info: Language data for afrikaans
(polyglossia) hyphenation^^Ihyph-af.hyp.txt
(polyglossia) lefthyphenmin^^I1
(polyglossia) loader^^Iloadhyph-af.tex
(polyglossia) patterns^^Ihyph-af.pat.txt
(polyglossia) righthyphenmin^^I2
(polyglossia) synonyms^^I on input line ...
Module polyglossia Info: Language afrikaans was not yet loaded; created with id 2 on input line ...
(babelsh.def
File: babelsh.def ....-..-.. Babel common definitions for shorthands
Taken verbatim from babel files (....-..-.. v...)
)
Package babel Info: Making " an active character on input line ....
))
Package polyglossia Info: Default language is afrikaans
> \box...=
\hbox(7.16+2.06)x75.11, direction TLT
.\TU/lmr/m/n/10 6
Expand Down Expand Up @@ -27,4 +46,4 @@ Don't change this file in any respect.
! OK.
<to be read again>
\begingroup
l. ...\START\showbox0\END
l. ...\TIMO\showbox0\END
6 changes: 5 additions & 1 deletion testfiles/autogen/test-gloss-af.lvt
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
\input{regression-test.tex}
\documentclass{article}
\AddToHook{package/bidi/before}{\let\xpgorigtypeout\typeout
\def\typeout#1{\let\typeout\xpgorigtypeout}}
\usepackage{polyglossia}
\START
\setmainlanguage{af}
\OMIT
\begin{document}
\day=6
\month=8
\year=2012
\setbox0=\hbox{\today.}
\START\showbox0\END
\TIMO\showbox0\END

13 changes: 12 additions & 1 deletion testfiles/autogen/test-gloss-af.tlg
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
(gloss-af.ldf
File: gloss-af.ldf polyglossia: module for af (Afrikaans)
(gloss-afrikaans.ldf
File: gloss-afrikaans.ldf polyglossia: module for Afrikaans
(babelsh.def
File: babelsh.def ....-..-.. Babel common definitions for shorthands
Taken verbatim from babel files (....-..-.. v...)
)
Package babel Info: Making " an active character on input line ....
))
Package polyglossia Info: Default language is afrikaans
> \box...=
\hbox(7.16+2.05998)x75.11
.\TU/lmr/m/n/10 6
Expand All @@ -11,4 +22,4 @@ Don't change this file in any respect.
! OK.
<to be read again>
\begingroup
l. ...\START\showbox0\END
l. ...\TIMO\showbox0\END
Loading

0 comments on commit efca3ed

Please sign in to comment.