-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide regression tests for Russian localization
- Loading branch information
Showing
4 changed files
with
3,449 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,308 @@ | ||
\documentclass{book} | ||
|
||
\input{regression-test} | ||
|
||
\ExplSyntaxOn | ||
\debug_on:n { check-declarations , deprecation } | ||
\ExplSyntaxOff | ||
|
||
\usepackage[russian]{babel} | ||
|
||
\usepackage{zref-clever} | ||
|
||
% This file is intended to test the russian language file. | ||
\ExplSyntaxOn | ||
\tl_gset:Nn \g__test_tmpa_tl { russian } % base language | ||
\seq_gset_from_clist:Nn \g__test_tmpa_seq % all aliases, including base | ||
{ | ||
russian , | ||
} | ||
\ExplSyntaxOff | ||
|
||
\begin{document} | ||
|
||
\START | ||
|
||
\ExplSyntaxOn | ||
|
||
\TEST { Language~declaration } | ||
{ | ||
\seq_map_inline:Nn \g__test_tmpa_seq | ||
{ | ||
\tl_show:c { \__zrefclever_language_varname:n {#1} } | ||
} | ||
\seq_if_exist:cT | ||
{ \__zrefclever_opt_varname_language:enn | ||
{ \g__test_tmpa_tl } { declension } { seq } | ||
} | ||
{ | ||
\seq_show:c | ||
{ | ||
\__zrefclever_opt_varname_language:enn | ||
{ \g__test_tmpa_tl } { declension } { seq } | ||
} | ||
} | ||
\seq_if_exist:cT | ||
{ | ||
\__zrefclever_opt_varname_language:enn | ||
{ \g__test_tmpa_tl } { gender } { seq } | ||
} | ||
{ | ||
\seq_show:c | ||
{ | ||
\__zrefclever_opt_varname_language:enn | ||
{ \g__test_tmpa_tl } { gender } { seq } | ||
} | ||
} | ||
\bool_if_exist:cT | ||
{ | ||
\__zrefclever_opt_varname_language:enn | ||
{ \g__test_tmpa_tl } { allcaps } { bool } | ||
} | ||
{ | ||
\bool_show:c | ||
{ | ||
\__zrefclever_opt_varname_language:enn | ||
{ \g__test_tmpa_tl } { allcaps } { bool } | ||
} | ||
} | ||
} | ||
|
||
|
||
\TEST { Language~file~options } | ||
{ | ||
\clist_map_inline:nn | ||
{ | ||
namesep , | ||
pairsep , | ||
listsep , | ||
lastsep , | ||
tpairsep , | ||
tlistsep , | ||
tlastsep , | ||
notesep , | ||
rangesep , | ||
} | ||
{ | ||
\tl_if_exist:cT | ||
{ | ||
\__zrefclever_opt_varname_lang_default:enn | ||
{ \g__test_tmpa_tl } { #1 } { tl } | ||
} | ||
{ | ||
\tl_show:c | ||
{ | ||
\__zrefclever_opt_varname_lang_default:enn | ||
{ \g__test_tmpa_tl } { #1 } { tl } | ||
} | ||
} | ||
} | ||
\clist_map_inline:nn | ||
{ | ||
refbounds-first-rb , | ||
refbounds-mid-rb , | ||
} | ||
{ | ||
\seq_if_exist:cT | ||
{ | ||
\__zrefclever_opt_varname_lang_default:enn | ||
{ \g__test_tmpa_tl } { #1 } { seq } | ||
} | ||
{ | ||
\seq_show:c | ||
{ | ||
\__zrefclever_opt_varname_lang_default:enn | ||
{ \g__test_tmpa_tl } { #1 } { seq } | ||
} | ||
} | ||
} | ||
|
||
\clist_map_inline:nn | ||
{ | ||
book , | ||
part , | ||
chapter , | ||
section , | ||
paragraph , | ||
appendix , | ||
page , | ||
line , | ||
figure , | ||
table , | ||
item , | ||
footnote , | ||
endnote , | ||
note , | ||
equation , | ||
theorem , | ||
lemma , | ||
corollary , | ||
proposition , | ||
definition , | ||
proof , | ||
result , | ||
remark , | ||
example , | ||
algorithm , | ||
listing , | ||
exercise , | ||
solution , | ||
} | ||
{ | ||
\seq_if_exist:cT | ||
{ | ||
\__zrefclever_opt_varname_lang_type:eenn | ||
{ \g__test_tmpa_tl } { #1 } { gender } { seq } | ||
} | ||
{ | ||
\seq_show:c | ||
{ | ||
\__zrefclever_opt_varname_lang_type:eenn | ||
{ \g__test_tmpa_tl } { #1 } { gender } { seq } | ||
} | ||
} | ||
\seq_if_exist:cTF | ||
{ | ||
\__zrefclever_opt_varname_language:enn | ||
{ \g__test_tmpa_tl } { declension } { seq } | ||
} | ||
{ | ||
\seq_map_inline:cn | ||
{ | ||
\__zrefclever_opt_varname_language:enn | ||
{ \g__test_tmpa_tl } { declension } { seq } | ||
} | ||
{ | ||
\clist_map_inline:nn | ||
{ | ||
Name-sg , | ||
name-sg , | ||
Name-pl , | ||
name-pl , | ||
Name-sg-ab , | ||
name-sg-ab , | ||
Name-pl-ab , | ||
name-pl-ab , | ||
} | ||
{ | ||
\tl_if_exist:cT | ||
{ | ||
\__zrefclever_opt_varname_lang_type:eenn | ||
{ \g__test_tmpa_tl } | ||
{ #1 } { ##1 - ####1 } { tl } | ||
} | ||
{ | ||
\tl_show:c | ||
{ | ||
\__zrefclever_opt_varname_lang_type:eenn | ||
{ \g__test_tmpa_tl } | ||
{ #1 } { ##1 - ####1 } { tl } | ||
} | ||
} | ||
} | ||
} | ||
} | ||
{ | ||
\clist_map_inline:nn | ||
{ | ||
Name-sg , | ||
name-sg , | ||
Name-pl , | ||
name-pl , | ||
Name-sg-ab , | ||
name-sg-ab , | ||
Name-pl-ab , | ||
name-pl-ab , | ||
} | ||
{ | ||
\tl_if_exist:cT | ||
{ | ||
\__zrefclever_opt_varname_lang_type:eenn | ||
{ \g__test_tmpa_tl } { #1 } { ##1 } { tl } | ||
} | ||
{ | ||
\tl_show:c | ||
{ | ||
\__zrefclever_opt_varname_lang_type:eenn | ||
{ \g__test_tmpa_tl } { #1 } { ##1 } { tl } | ||
} | ||
} | ||
} | ||
} | ||
\clist_map_inline:nn | ||
{ | ||
rangesep , | ||
} | ||
{ | ||
\tl_if_exist:cT | ||
{ | ||
\__zrefclever_opt_varname_lang_type:eenn | ||
{ \g__test_tmpa_tl } { #1 } { ##1 } { tl } | ||
} | ||
{ | ||
\tl_show:c | ||
{ | ||
\__zrefclever_opt_varname_lang_type:eenn | ||
{ \g__test_tmpa_tl } { #1 } { ##1 } { tl } | ||
} | ||
} | ||
} | ||
\clist_map_inline:nn | ||
{ | ||
rangetopair , | ||
} | ||
{ | ||
\bool_if_exist:cT | ||
{ | ||
\__zrefclever_opt_varname_lang_type:eenn | ||
{ \g__test_tmpa_tl } { #1 } { ##1 } { bool } | ||
} | ||
{ | ||
\bool_show:c | ||
{ | ||
\__zrefclever_opt_varname_lang_type:eenn | ||
{ \g__test_tmpa_tl } { #1 } { ##1 } { bool } | ||
} | ||
} | ||
} | ||
} | ||
\clist_map_inline:nn | ||
{ | ||
equation , | ||
} | ||
{ | ||
\clist_map_inline:nn | ||
{ | ||
refbounds-first , | ||
refbounds-first-sg , | ||
refbounds-first-pb , | ||
refbounds-first-rb , | ||
refbounds-mid , | ||
refbounds-mid-rb , | ||
refbounds-mid-re , | ||
refbounds-last , | ||
refbounds-last-pe , | ||
refbounds-last-re , | ||
} | ||
{ | ||
\seq_if_exist:cT | ||
{ | ||
\__zrefclever_opt_varname_lang_type:eenn | ||
{ \g__test_tmpa_tl } { #1 } { ##1 } { seq } | ||
} | ||
{ | ||
\seq_show:c | ||
{ | ||
\__zrefclever_opt_varname_lang_type:eenn | ||
{ \g__test_tmpa_tl } { #1 } { ##1 } { seq } | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
\ExplSyntaxOff | ||
|
||
\OMIT | ||
|
||
\end{document} |
Oops, something went wrong.