Skip to content

Commit

Permalink
Reorganize babel test files
Browse files Browse the repository at this point in the history
  • Loading branch information
zepinglee committed Jul 26, 2024
1 parent 9fc586f commit 11826e1
Show file tree
Hide file tree
Showing 21 changed files with 786 additions and 177 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,29 @@
\input{csl-test}

\usepackage[french]{babel}
\usepackage{citation-style-language}

\usepackage[style = apa]{citation-style-language}
\cslsetup{
regression-test = true,
style = locale-test,
locale = fr-CA,
}
\addbibresource{test.json}


\begin{document}

\START

\TEST{Babel locale}{
\cite{ITEM-1}
\begin{document}

\ExplSyntaxOn
\TEST{CSL~ locale}{
\tl_show:N \l__csl_locale_tl
}
\ExplSyntaxOff

\cite{ITEM-1}\par
\cite{ITEM-2}\par
\cite{ITEM-3}\par
\cite{ITEM-4}\par

\TEST{Bibliography}{
\printbibliography
Expand Down
80 changes: 80 additions & 0 deletions tests/latex/luatex-1/locale.tlg
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
No file locale.aux.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line ....
LaTeX Font Info: ... okay on input line ....
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line ....
LaTeX Font Info: ... okay on input line ....
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line ....
LaTeX Font Info: ... okay on input line ....
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line ....
LaTeX Font Info: ... okay on input line ....
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line ....
LaTeX Font Info: Trying to load font information for TS1+cmr on input line ....
LaTeX Font Info: ... okay on input line ....
LaTeX Font Info: Checking defaults for TU/lmr/m/n on input line ....
LaTeX Font Info: ... okay on input line ....
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line ....
LaTeX Font Info: ... okay on input line ....
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line ....
LaTeX Font Info: ... okay on input line ....
LaTeX Info: Redefining \degres on input line ....
LaTeX Info: Redefining \up on input line ....
============================================================
TEST 1: CSL locale
============================================================
> \l__csl_locale_tl=fr-CA.
<recently read> }
l. ...}
============================================================
> \l__csl_citation_info_tl=citationID={ITEM-1@1},citationItems={{id={ITEM-1}}},properties={noteIndex={0}}.
<recently read> }
l. ...\cite{ITEM-1}
\par
> \l__csl_citation_tl=(D’Arcus, 2005).
<recently read> }
l. ...\cite{ITEM-1}
\par
> \l__csl_citation_info_tl=citationID={ITEM-2@1},citationItems={{id={ITEM-2}}},properties={noteIndex={0}}.
<recently read> }
l. ...\cite{ITEM-2}
\par
> \l__csl_citation_tl=(Bennett, 2009).
<recently read> }
l. ...\cite{ITEM-2}
\par
> \l__csl_citation_info_tl=citationID={ITEM-3@1},citationItems={{id={ITEM-3}}},properties={noteIndex={0}}.
<recently read> }
l. ...\cite{ITEM-3}
\par
> \l__csl_citation_tl=(Lamport, 1994).
<recently read> }
l. ...\cite{ITEM-3}
\par
> \l__csl_citation_info_tl=citationID={ITEM-4@1},citationItems={{id={ITEM-4}}},properties={noteIndex={0}}.
<recently read> }
l. ...\cite{ITEM-4}
\par
> \l__csl_citation_tl=(Mittelbach et al., 2004).
<recently read> }
l. ...\cite{ITEM-4}
\par
============================================================
TEST 2: Bibliography
============================================================
The sequence \l__csl_bibliography_seq contains the items (without outer braces):
> {\begin {thebibliography}{index = 1, hanging-indent = true, line-spacing = 2, entry-spacing = 0}}
> {\bibitem {ITEM-2} Bennett, F. G., Jr. (2009). Getting property right: « Informal » mortgages in the Japanese courts. \textit {Pac. Rim L. \& Pol’y J.}, \textit {18}, 463‑509.}
> {\bibitem {ITEM-1} D’Arcus, B. (2005). \textit {Boundaries of dissent: Protest and state power in the media age}. Routledge.}
> {\bibitem {ITEM-3} Lamport, L. (1994). \textit {LaTeX: A document preparation system: User’s guide and reference manual} (2\textsuperscript {e} éd.). Addison-Wesley.}
> {\bibitem {ITEM-4} Mittelbach, F., Goossens, M., Braams, J., Carlisle, D., \& Rowley, C. (2004). \textit {The LaTeX companion} (2\textsuperscript {e} éd.). Addison-Wesley.}
> {\end {thebibliography}}.
<recently read> }
l. ...}
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <7> on input line ....
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line ....
============================================================
[1
] (locale.aux)
33 changes: 33 additions & 0 deletions tests/latex/luatex-1/package-babel.lvt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
\input{regression-test}

\documentclass{article}

\input{csl-test}

\usepackage[french]{babel}

\usepackage[style = apa]{citation-style-language}
\cslsetup{regression-test = true}
\addbibresource{test.json}


\START

\begin{document}

\ExplSyntaxOn
\TEST{CSL~ locale}{
\tl_show:N \l__csl_locale_tl
}
\ExplSyntaxOff

\cite{ITEM-1}\par
\cite{ITEM-2}\par
\cite{ITEM-3}\par
\cite{ITEM-4}\par

\TEST{Bibliography}{
\printbibliography
}

\end{document}
81 changes: 81 additions & 0 deletions tests/latex/luatex-1/package-babel.tlg
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
No file package-babel.aux.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line ....
LaTeX Font Info: ... okay on input line ....
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line ....
LaTeX Font Info: ... okay on input line ....
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line ....
LaTeX Font Info: ... okay on input line ....
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line ....
LaTeX Font Info: ... okay on input line ....
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line ....
LaTeX Font Info: Trying to load font information for TS1+cmr on input line ....
LaTeX Font Info: ... okay on input line ....
LaTeX Font Info: Checking defaults for TU/lmr/m/n on input line ....
LaTeX Font Info: ... okay on input line ....
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line ....
LaTeX Font Info: ... okay on input line ....
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line ....
LaTeX Font Info: ... okay on input line ....
LaTeX Info: Redefining \degres on input line ....
LaTeX Info: Redefining \up on input line ....
Package citation-style-language Info: CSL locale "fr-FR" from babel language "french".
============================================================
TEST 1: CSL locale
============================================================
> \l__csl_locale_tl=fr-FR.
<recently read> }
l. ...}
============================================================
> \l__csl_citation_info_tl=citationID={ITEM-1@1},citationItems={{id={ITEM-1}}},properties={noteIndex={0}}.
<recently read> }
l. ...\cite{ITEM-1}
\par
> \l__csl_citation_tl=(D’Arcus, 2005).
<recently read> }
l. ...\cite{ITEM-1}
\par
> \l__csl_citation_info_tl=citationID={ITEM-2@1},citationItems={{id={ITEM-2}}},properties={noteIndex={0}}.
<recently read> }
l. ...\cite{ITEM-2}
\par
> \l__csl_citation_tl=(Bennett, 2009).
<recently read> }
l. ...\cite{ITEM-2}
\par
> \l__csl_citation_info_tl=citationID={ITEM-3@1},citationItems={{id={ITEM-3}}},properties={noteIndex={0}}.
<recently read> }
l. ...\cite{ITEM-3}
\par
> \l__csl_citation_tl=(Lamport, 1994).
<recently read> }
l. ...\cite{ITEM-3}
\par
> \l__csl_citation_info_tl=citationID={ITEM-4@1},citationItems={{id={ITEM-4}}},properties={noteIndex={0}}.
<recently read> }
l. ...\cite{ITEM-4}
\par
> \l__csl_citation_tl=(Mittelbach et al., 2004).
<recently read> }
l. ...\cite{ITEM-4}
\par
============================================================
TEST 2: Bibliography
============================================================
The sequence \l__csl_bibliography_seq contains the items (without outer braces):
> {\begin {thebibliography}{index = 1, hanging-indent = true, line-spacing = 2, entry-spacing = 0}}
> {\bibitem {ITEM-2} Bennett, F. G., Jr. (2009). Getting property right: « Informal » mortgages in the Japanese courts. \textit {Pac. Rim L. \& Pol’y J.}, \textit {18}, 463‑509.}
> {\bibitem {ITEM-1} D’Arcus, B. (2005). \textit {Boundaries of dissent: Protest and state power in the media age}. Routledge.}
> {\bibitem {ITEM-3} Lamport, L. (1994). \textit {LaTeX: A document preparation system: User’s guide and reference manual} (2\textsuperscript {e} éd.). Addison-Wesley.}
> {\bibitem {ITEM-4} Mittelbach, F., Goossens, M., Braams, J., Carlisle, D., \& Rowley, C. (2004). \textit {The LaTeX companion} (2\textsuperscript {e} éd.). Addison-Wesley.}
> {\end {thebibliography}}.
<recently read> }
l. ...}
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <7> on input line ....
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line ....
============================================================
[1
] (package-babel.aux)
27 changes: 0 additions & 27 deletions tests/latex/luatex-2/babel.lvt

This file was deleted.

24 changes: 0 additions & 24 deletions tests/latex/luatex-2/locale-babel.tlg

This file was deleted.

21 changes: 14 additions & 7 deletions tests/latex/luatex-2/locale.lvt
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,30 @@

\input{csl-test}

\usepackage{citation-style-language}
\usepackage[french]{babel}

\usepackage[style = apa]{citation-style-language}
\cslsetup{
regression-test = true,
style = locale-test,
locale = zh-CN,
locale = fr-CA,
}
\addbibresource{test.json}


\begin{document}

\START

\TEST{Force locale}{
\cite{ITEM-1}
\begin{document}

\ExplSyntaxOn
\TEST{CSL~ locale}{
\tl_show:N \l__csl_locale_tl
}
\ExplSyntaxOff

\cite{ITEM-1}\par
\cite{ITEM-2}\par
\cite{ITEM-3}\par
\cite{ITEM-4}\par

\TEST{Bibliography}{
\printbibliography
Expand Down
Loading

0 comments on commit 11826e1

Please sign in to comment.