Skip to content

Commit bdce5e2

Browse files
committed
Update configs of tests
1 parent caef040 commit bdce5e2

10 files changed

Lines changed: 30 additions & 32 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ustcthesis-doc.pdf
55

66
## test files:
77
build/
8-
test/**/*.pdf
8+
tests/**/*.pdf
99

1010
## Core latex/pdflatex auxiliary files:
1111
*.aux

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ test:
2929
l3build check
3030

3131
save:
32-
bash test/save.sh
32+
bash tests/save.sh
3333

3434
clean : FORCE_MAKE
3535
$(LATEXMK) -c $(MAIN).tex $(NAME)-doc.tex

build.lua

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
module = "ustcthesis"
77

8-
testfiledir = "./test/testfiles"
9-
testsuppdir = "./test/support"
8+
testfiledir = "./tests/testfiles"
9+
testsuppdir = "./tests/support"
1010

1111
demofiles = {"main.tex", "bib", "chapters"}
1212
installfiles = {"*.cls", "*.bst", "*.bbx", "*.cbx", "figures"}
@@ -18,10 +18,10 @@ stdengine = "xetex"
1818

1919
checkconfigs = {
2020
"build",
21-
"test/config-crossref",
22-
"test/config-nomencl",
23-
"test/config-bibtex",
24-
"test/config-biblatex",
21+
"tests/config-crossref",
22+
"tests/config-nomencl",
23+
"tests/config-bibtex",
24+
"tests/config-biblatex",
2525
}
2626

2727
typesetexe = "xelatex"
@@ -30,8 +30,6 @@ unpackexe = "xetex"
3030
checkopts = "-file-line-error -halt-on-error -interaction=nonstopmode"
3131
typesetopts = "-file-line-error -halt-on-error -interaction=nonstopmode"
3232

33-
lvtext = ".tex"
34-
3533
local package_repository = "https://github.com/ustctug/ustcthesis"
3634
local version_pattern = "[%d.]+[%l%d.-]*"
3735

tests/config-biblatex.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
testfiledir = "./test/testfiles-biblatex"
1+
testfiledir = "./tests/testfiles-biblatex"
22

33
checkruns = 3
44

tests/config-bibtex.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
testfiledir = "./test/testfiles-bibtex"
1+
testfiledir = "./tests/testfiles-bibtex"
22

33
checkruns = 3
44

tests/config-crossref.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
testfiledir = "./test/testfiles-crossref"
1+
testfiledir = "./tests/testfiles-crossref"
22

33
checkruns = 2

tests/config-nomencl.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
testfiledir = "./test/testfiles-nomencl"
1+
testfiledir = "./tests/testfiles-nomencl"
22

33
checkruns = 2
44

tests/save.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ save_file () {
22
test="$1";
33
for config in build crossref nomencl bibtex biblatex; do
44
if [[ "$config" == "build" ]]; then
5-
test_dir="test/testfiles";
5+
test_dir="tests/testfiles";
66
else
7-
test_dir="test/testfiles-$config";
7+
test_dir="tests/testfiles-$config";
88
fi
9-
file_path="$test_dir/$test.tex";
9+
file_path="$test_dir/$test.lvt";
1010
if [ -f "$file_path" ]; then
1111
if [[ "$config" == "build" ]]; then
1212
l3build save --halt-on-error "$test" || exit 1;
1313
else
14-
l3build save --halt-on-error --config "test/config-$config" "$test" || exit 1;
14+
l3build save --halt-on-error --config "tests/config-$config" "$test" || exit 1;
1515
fi
1616
break;
1717
fi
@@ -21,14 +21,14 @@ save_file () {
2121
save_config () {
2222
config="$1";
2323
if [[ "$config" == "build" ]]; then
24-
for testfile in test/testfiles/*.tex; do
25-
test="$(basename "$testfile" .tex)";
24+
for testfile in tests/testfiles/*.lvt; do
25+
test="$(basename "$testfile" .lvt)";
2626
l3build save --halt-on-error "$test" || exit 1;
2727
done
2828
else
29-
for testfile in "test/testfiles-$config"/*.tex ; do
30-
test="$(basename "$testfile" .tex)";
31-
l3build save --halt-on-error --config "test/config-$config" "$test" || exit 1;
29+
for testfile in "tests/testfiles-$config"/*.lvt ; do
30+
test="$(basename "$testfile" .lvt)";
31+
l3build save --halt-on-error --config "tests/config-$config" "$test" || exit 1;
3232
done
3333
fi
3434
}

tests/test.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
test="$(basename $1 .tex)";
2-
baseline_dir="test/baseline";
3-
diff_dir="test/diff";
1+
test="$(basename $1 .lvt)";
2+
baseline_dir="tests/baseline";
3+
diff_dir="tests/diff";
44
baseline_path="$baseline_dir/$test.pdf";
55
for config in build crossref nomencl bibtex biblatex; do
66
if [[ "$config" == "build" ]]; then
7-
test_dir="test/testfiles";
7+
test_dir="tests/testfiles";
88
build_dir="build/test";
99
else
10-
test_dir="test/testfiles-$config";
11-
build_dir="build/test-test/config-$config";
10+
test_dir="tests/testfiles-$config";
11+
build_dir="build/test-tests/config-$config";
1212
fi
13-
file_path="$test_dir/$test.tex";
13+
file_path="$test_dir/$test.lvt";
1414
if [ -f "$file_path" ]; then
1515
if [[ "$config" == "build" ]]; then
1616
l3build save --halt-on-error "$test" || exit 1;
1717
else
18-
l3build save --halt-on-error --config "test/config-$config" "$test" || exit 1;
18+
l3build save --halt-on-error --config "tests/config-$config" "$test" || exit 1;
1919
fi
2020
output_path="$build_dir/$test.pdf";
2121
xdvipdfmx "$build_dir/$test.xdv" -o "$output_path";

tests/testfiles-bibtex/bibtex-numeric.tlg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ Completed box being shipped out [1]
683683
...\glue 0.0 plus 1.0fil minus 1.0fil
684684
.\kern 722.98453
685685
.\kern 0.0
686-
(bibtex-numerical.bbl
686+
(bibtex-numeric.bbl
687687
Package fontspec Info:
688688
(fontspec) Font family 'FandolHei(0)' created for font 'FandolHei' with options [Extension={.otf},UprightFont={*-Regular},BoldFont={*-Bold}].
689689
(fontspec)

0 commit comments

Comments
 (0)