Skip to content

Commit 57fe00e

Browse files
committed
Add tests
1 parent 77ff620 commit 57fe00e

40 files changed

Lines changed: 17591 additions & 43 deletions

.github/tl_packages

Lines changed: 44 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,82 @@
11
# The test framework itself
22
l3build
3-
latexmk
43
#
54
# Required to build formats
6-
bibtex
75
latex-bin
8-
makeindex
96
tex
107
#
118
# Assuming a 'basic' font set up, metafont is required to avoid
129
# warnings with some packages and errors with others
1310
metafont
1411
mfware
15-
#
16-
# Dependencies for xeCJK
17-
fontspec
18-
ulem
19-
xecjk
20-
xetex
21-
# Dependencies for LuaTeX
22-
chinese-jfm
23-
lualatex-math
24-
#
25-
# Dependencies for ctex
26-
cjk
27-
ctex
28-
zhnumber
29-
#
30-
# Dependencies for algorithms
31-
float
32-
#
33-
# Dependencies for algorithm2e
34-
algorithm2e
35-
ifoddpage
36-
relsize
37-
#
38-
# Dependencies for biblatex
39-
biber
40-
biblatex
41-
biblatex-gb7714-2015
42-
xstring
43-
#
44-
# Dependencies for nomencl
45-
nomencl
46-
koma-script
47-
xkeyval
48-
#
4912
# Dependencies for ustcthesis
50-
bigfoot
13+
amsmath
14+
bigfoot # footmisc, perpage
5115
caption
16+
cjk # ctex
17+
ctex
5218
enumitem
5319
fancyhdr
5420
filehook
21+
fontspec
5522
footmisc
23+
geometry
24+
graphics
5625
multirow
57-
natbib
5826
notoccite
5927
pdfpages
6028
titlesec
6129
unicode-math
30+
url
31+
zhnumber # ctex
6232
#
63-
# Dependencies for fonts
33+
# Fonts
6434
fandol
35+
libertinus-fonts
36+
newcomputermodern
37+
newtx
38+
xpatch # newtx
39+
carlisle # newtx
40+
oberdiek # newtx
6541
stix2-otf
6642
tex-gyre
6743
xits
6844
#
45+
# Dependencies for XeTeX
46+
ulem
47+
xecjk
48+
xetex
49+
#
50+
# Dependencies for LuaTeX
51+
chinese-jfm
52+
lualatex-math
53+
#
6954
# Dependencies for extra packages
7055
algorithms
56+
algorithm2e
57+
amscls # amsthm
58+
biber
59+
biblatex
60+
biblatex-gb7714-2015
61+
bibtex
7162
booktabs
63+
float # algorithms
64+
hyperref
65+
ifoddpage # algorithm2e
66+
makeindex # nomencl
7267
mathtools
73-
threeparttable
68+
natbib # bibtex
69+
nomencl
70+
relsize # algorithm2e
7471
siunitx
72+
threeparttable
73+
tools # longtable
74+
xkeyval # nomencl
75+
xstring # biblatex-gb7714-2015
7576
#
76-
# Dependencies for doc
77+
# Dependencies for documentation
7778
hypdoc
79+
latexmk
7880
listings
7981
xcolor
8082
#

.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
{
2+
"files.associations": {
3+
"*.lvt": "latex",
4+
"*.tlg": "latex",
5+
"*latexmkrc": "perl",
6+
"tl_packages": "shellscript"
7+
},
28
"latex-workshop.intellisense.unimathsymbols.enabled": true,
39
"latex-workshop.latex.build.enableMagicComments": false,
410
"latex-workshop.latex.recipes": [

build.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ checkconfigs = {
2727
typesetexe = "xelatex"
2828
unpackexe = "xetex"
2929

30+
excludetests = {
31+
"fontset-windows",
32+
"fontset-mac",
33+
}
34+
3035
checkopts = "-file-line-error -halt-on-error -interaction=nonstopmode"
3136
typesetopts = "-file-line-error -halt-on-error -interaction=nonstopmode"
3237

tests/config-bibtex.lua

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,17 @@ checkruns = 3
44

55
function runtest_tasks(name, run)
66
if run == 1 then
7-
return "bibtex -terse " .. name
7+
local aux_files = filelist(testdir, name .. "*.aux")
8+
local commands = {}
9+
for _, aux_file in ipairs(aux_files) do
10+
local base_name = jobname(aux_file)
11+
if #aux_files == 1 or base_name ~= name then
12+
table.insert(commands, "bibtex -terse " .. base_name)
13+
end
14+
end
15+
local command = table.concat(commands, os_concat)
16+
-- io.stderr:write(command .. "\n")
17+
return command
818
else
919
return ""
1020
end
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
\input{regression-test}
2+
\documentclass[degree=doctor, fontset=fandol]{ustcthesis}
3+
4+
\begin{filecontents}[noheader, overwrite]{\jobname-chapter-1.tex}
5+
\chapter{Foo}
6+
\cite{sunliguang2016jidi, liyongchi2016zhangliang}\par
7+
\bibliographystyle{ustcthesis-numerical}
8+
\bibliography{refs-numerical}
9+
\end{filecontents}
10+
11+
\begin{filecontents}[noheader, overwrite]{\jobname-chapter-2.tex}
12+
\chapter{Foo}
13+
\cite{sunliguang2016jidi, liujingshuang2014shidi}\par
14+
\bibliographystyle{ustcthesis-numerical}
15+
\bibliography{refs-numerical}
16+
\end{filecontents}
17+
18+
\usepackage[sort, sectionbib]{natbib}
19+
\bibliographystyle{ustcthesis-numerical}
20+
21+
\usepackage{chapterbib}
22+
23+
24+
\pagestyle{empty}
25+
26+
\begin{document}
27+
\START
28+
\showoutput
29+
30+
\include{\jobname-chapter-1}
31+
\include{\jobname-chapter-2}
32+
33+
\clearpage
34+
\OMIT
35+
\end{document}

0 commit comments

Comments
 (0)