Skip to content

Commit

Permalink
Tidy up locale test file
Browse files Browse the repository at this point in the history
  • Loading branch information
josephwright committed Mar 27, 2023
1 parent f3c3fe0 commit d9d379d
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 58 deletions.
40 changes: 25 additions & 15 deletions testfiles/siunitx-locale.lvt
Expand Up @@ -10,7 +10,18 @@

\usepackage{siunitx}

\usepackage[portuguese,brazilian,catalan,english,french,german,polish,spanish]{babel}
\usepackage
[
brazilian,
catalan,
english,
french,
german,
portuguese,
polish,
spanish
]
{babel}

\ExplSyntaxOn

Expand Down Expand Up @@ -51,27 +62,26 @@
{
\clist_map_function:nN
{
portuguese , brazilian , catalan , english , french , german ,
polish , spanish
brazilian ,
catalan ,
english ,
french ,
german ,
portuguese,
polish ,
spanish
}
\test:n
}

\TEST { Option~setting~"locale" }
{
\test:nn { 1.23e4 } { \metre\per\second }
\keys_set:nn { siunitx } { locale = DE }
\test:nn { 1.23e4 } { \metre\per\second }
\keys_set:nn { siunitx } { locale = PL }
\test:nn { 1.23e4 } { \metre\per\second }
\keys_set:nn { siunitx } { locale = FR }
\test:nn { 1.23e4 } { \metre\per\second }
\keys_set:nn { siunitx } { locale = UK }
\test:nn { 1.23e4 } { \metre\per\second }
\keys_set:nn { siunitx } { locale = US }
\test:nn { 1.23e4 } { \metre\per\second }
\keys_set:nn { siunitx } { locale = ZA }
\test:nn { 1.23e4 } { \metre\per\second }
\clist_map_inline:nn { DE , FR , PL , UK , US , ZA }
{
\keys_set:nn { siunitx } { locale = #1 }
\test:nn { 1.23e4 } { \metre\per\second }
}
}

\END
86 changes: 43 additions & 43 deletions testfiles/siunitx-locale.tlg
Expand Up @@ -39,41 +39,6 @@ l. ... }
<argument> \l_tmpa_box
l. ... }
> \box...=
\hbox(6.44444+1.94444)x32.22226
.\mathon
.\OT1/cmr/m/n/10 1
.\mathoff
.\OT1/cmr/m/n/10 ,
.\glue 3.33333 plus 2.08331 minus 0.88889
.\mathon
.\OT1/cmr/m/n/10 2
.\mathoff
.\glue 3.33333 plus 1.66666 minus 1.11111
.\hbox(4.30554+0.0)x4.44444
..\OT1/cmr/m/n/10 e
.\glue 3.33333 plus 1.66666 minus 1.11111
.\mathon
.\OT1/cmr/m/n/10 3
.\mathoff
! OK.
<argument> \l_tmpa_box
l. ... }
> \box...=
\hbox(6.44444+0.0)x21.6667
.\mathon
.\OT1/cmr/m/n/10 1
.\mathoff
.\glue 3.33333 plus 1.66666 minus 1.11111
.\hbox(4.30554+0.0)x5.00002
..\OT1/cmr/m/n/10 a
.\glue 3.33333 plus 1.66666 minus 1.11111
.\mathon
.\OT1/cmr/m/n/10 2
.\mathoff
! OK.
<argument> \l_tmpa_box
l. ... }
> \box...=
\hbox(6.67859+1.94444)x30.5556
.\mathon
.\OT1/cmr/m/n/10 1
Expand Down Expand Up @@ -225,6 +190,41 @@ l. ... }
<argument> \l_tmpa_box
l. ... }
> \box...=
\hbox(6.44444+1.94444)x32.22226
.\mathon
.\OT1/cmr/m/n/10 1
.\mathoff
.\OT1/cmr/m/n/10 ,
.\glue 3.33333 plus 2.08331 minus 0.88889
.\mathon
.\OT1/cmr/m/n/10 2
.\mathoff
.\glue 3.33333 plus 1.66666 minus 1.11111
.\hbox(4.30554+0.0)x4.44444
..\OT1/cmr/m/n/10 e
.\glue 3.33333 plus 1.66666 minus 1.11111
.\mathon
.\OT1/cmr/m/n/10 3
.\mathoff
! OK.
<argument> \l_tmpa_box
l. ... }
> \box...=
\hbox(6.44444+0.0)x21.6667
.\mathon
.\OT1/cmr/m/n/10 1
.\mathoff
.\glue 3.33333 plus 1.66666 minus 1.11111
.\hbox(4.30554+0.0)x5.00002
..\OT1/cmr/m/n/10 a
.\glue 3.33333 plus 1.66666 minus 1.11111
.\mathon
.\OT1/cmr/m/n/10 2
.\mathoff
! OK.
<argument> \l_tmpa_box
l. ... }
> \box...=
\hbox(6.67859+1.94444)x30.5556
.\mathon
.\OT1/cmr/m/n/10 1
Expand Down Expand Up @@ -362,15 +362,15 @@ l. ... }
<argument> \l_tmpa_box
l. ... }
> \box...=
\hbox(8.14003+1.94444)x71.3889
\hbox(8.14003+1.94444)x70.83342
.\mathon
.\OT1/cmr/m/n/10 1
.\hbox(1.05554+1.94444)x2.77779
..\OML/cmm/m/it/10 ;
.\OT1/cmr/m/n/10 2
.\OT1/cmr/m/n/10 3
.\glue(\medmuskip) 2.22217 plus 1.11108 minus 2.22217
.\OMS/cmsy/m/n/10 ^^A
.\OMS/cmsy/m/n/10 ^^B
.\glue(\medmuskip) 2.22217 plus 1.11108 minus 2.22217
.\OT1/cmr/m/n/10 1
.\OT1/cmr/m/n/10 0
Expand All @@ -381,9 +381,7 @@ l. ... }
.\penalty 10000
.\mathon
.\OT1/cmr/m/n/10 m
.\glue(\medmuskip) 2.22217 plus 1.11108 minus 2.22217
.\OMS/cmsy/m/n/10 ^^A
.\glue(\medmuskip) 2.22217 plus 1.11108 minus 2.22217
.\glue 1.66663
.\OT1/cmr/m/n/10 s
.\hbox(4.51111+0.83334)x10.73615, shifted -3.62892
..\OMS/cmsy/m/n/7 ^^@
Expand All @@ -393,15 +391,15 @@ l. ... }
<argument> \l_tmpa_box
l. ... }
> \box...=
\hbox(8.14003+1.94444)x70.83342
\hbox(8.14003+1.94444)x71.3889
.\mathon
.\OT1/cmr/m/n/10 1
.\hbox(1.05554+1.94444)x2.77779
..\OML/cmm/m/it/10 ;
.\OT1/cmr/m/n/10 2
.\OT1/cmr/m/n/10 3
.\glue(\medmuskip) 2.22217 plus 1.11108 minus 2.22217
.\OMS/cmsy/m/n/10 ^^B
.\OMS/cmsy/m/n/10 ^^A
.\glue(\medmuskip) 2.22217 plus 1.11108 minus 2.22217
.\OT1/cmr/m/n/10 1
.\OT1/cmr/m/n/10 0
Expand All @@ -412,7 +410,9 @@ l. ... }
.\penalty 10000
.\mathon
.\OT1/cmr/m/n/10 m
.\glue 1.66663
.\glue(\medmuskip) 2.22217 plus 1.11108 minus 2.22217
.\OMS/cmsy/m/n/10 ^^A
.\glue(\medmuskip) 2.22217 plus 1.11108 minus 2.22217
.\OT1/cmr/m/n/10 s
.\hbox(4.51111+0.83334)x10.73615, shifted -3.62892
..\OMS/cmsy/m/n/7 ^^@
Expand Down

0 comments on commit d9d379d

Please sign in to comment.