gbranden pushed a commit to branch branden-2023-07-05 in repository groff. commit 2269f3d6095ad51325d43151cf51bbb9a1073e65 Author: G. Branden Robinson <g.branden.robin...@gmail.com> AuthorDate: Thu Mar 9 11:48:42 2023 -0600
[tests]: Add Russian language support (7/7). * src/roff/groff/tests/localization_works.sh: * tmac/tests/e_ld-works.sh: Test it. Fixes <https://savannah.gnu.org/bugs/?63076>. Thanks to Nikita Ivanov. --- ChangeLog | 10 ++++++++++ src/roff/groff/tests/localization_works.sh | 4 ++++ tmac/tests/e_ld-works.sh | 19 ++++++++++++++++++- 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 64ced526c..9fec6effa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2023-03-09 G. Branden Robinson <g.branden.robin...@gmail.com> + + [tests]: Add Russian language support (7/7). + + * src/roff/groff/tests/localization_works.sh: + * tmac/tests/e_ld-works.sh: Test it. + + Fixes <https://savannah.gnu.org/bugs/?63076>. Thanks to Nikita + Ivanov. + 2023-03-08 G. Branden Robinson <g.branden.robin...@gmail.com> [docs]: Add Russian language support (6/7). diff --git a/src/roff/groff/tests/localization_works.sh b/src/roff/groff/tests/localization_works.sh index 0585259b0..24cc6dcb0 100755 --- a/src/roff/groff/tests/localization_works.sh +++ b/src/roff/groff/tests/localization_works.sh @@ -52,6 +52,10 @@ echo "testing Japanese localization" >&2 OUTPUT=$(echo "$DOC" | "$groff" -Tascii -m ja) echo "$OUTPUT" | grep -qx japanese +echo "testing Russian localization" >&2 +OUTPUT=$(echo "$DOC" | "$groff" -Tascii -m ru) +echo "$OUTPUT" | grep -qx russian + echo "testing Swedish localization" >&2 OUTPUT=$(echo "$DOC" | "$groff" -Tascii -m sv) echo "$OUTPUT" | grep -qx swedish diff --git a/tmac/tests/e_ld-works.sh b/tmac/tests/e_ld-works.sh index f3327a817..4af1f5f76 100755 --- a/tmac/tests/e_ld-works.sh +++ b/tmac/tests/e_ld-works.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2021 Free Software Foundation, Inc. +# Copyright (C) 2021-2023 Free Software Foundation, Inc. # # This file is part of groff. # @@ -48,6 +48,8 @@ output_cs=$(printf "%s\n" "$input" | "$groff" -Tutf8 -P-cbou -me -mcs) output_de=$(printf "%s\n" "$input" | "$groff" -Tutf8 -P-cbou -me -mde) output_fr=$(printf "%s\n" "$input" | "$groff" -Tutf8 -P-cbou -me -mfr) output_it=$(printf "%s\n" "$input" | "$groff" -Tutf8 -P-cbou -me -mit) +output_ru=$(printf "%s\n" "$input" \ + | "$groff" -Tutf8 -P-cbou -me -mru -a) output_sv=$(printf "%s\n" "$input" | "$groff" -Tutf8 -P-cbou -me -msv) echo 'checking that `td` string updated correctly for English' >&2 @@ -113,6 +115,21 @@ echo "$output_it" | grep -Eqx ' +Capitolo 1' || wail echo 'checking for correct Italian "Appendix" string' >&2 echo "$output_it" | grep -Eqx ' +Appendice A' || wail +# Russian localization +echo 'checking that `td` string updated correctly for Russian' >&2 +echo "$output_ru" | sed -n '4p' \ + | grep -Fqx ' The day was <u043F><u043E><u043D><u0435><u0434><u0435><u043B><u044C><u043D><u0438><u043A>, 15 <u0434><u0435><u043A><u0430><u0431><u0440><u044F> 2008.' \ + || wail + +echo 'checking for correct Russian "Chapter" string' >&2 +echo "$output_ru" | sed -n '2p' \ + | grep -Fqx ' <u0413><u043B><u0430><u0432><u0430> 1' || wail + +echo 'checking for correct Russian "Appendix" string' >&2 +echo "$output_ru" | sed -n '6p' \ + | grep -Fqx ' <u041F><u0440><u0438><u043B><u043E><u0436><u0435><u043D><u0438><u044F> A' \ + || wail + # Swedish localization echo 'checking that `td` string updated correctly for Swedish (1)' >&2 echo "$output_sv" | grep -q 'The day was m' || wail _______________________________________________ Groff-commit mailing list Groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit