gbranden pushed a commit to branch branden-2023-07-05 in repository groff. commit c3a90c4aebf93a3d69363439c79c17b8cc5fbdbc Author: G. Branden Robinson <g.branden.robin...@gmail.com> AuthorDate: Mon Mar 13 14:22:03 2023 -0500
[tests]: Add Spanish language support (5/5). * src/roff/groff/tests/localization_works.sh: * tmac/tests/e_ld-works.sh: Test it. Fixes <https://savannah.gnu.org/bugs/?63921>. Thanks to Eloi Montañés. Also thanks to Dave Kemper, who has been patiently offering me a tall glass labelled "use 'groff -a' to regression-test formatter output" for years, and from which I have been slow to drink. --- ChangeLog | 10 ++++++++++ src/roff/groff/tests/localization_works.sh | 4 ++++ tmac/tests/e_ld-works.sh | 14 ++++++++++++++ 3 files changed, 28 insertions(+) diff --git a/ChangeLog b/ChangeLog index e9364efe8..39d6717a7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2023-03-13 G. Branden Robinson <g.branden.robin...@gmail.com> + + [tests]: Add Spanish language support (5/5). + + * src/roff/groff/tests/localization_works.sh: + * tmac/tests/e_ld-works.sh: Test it. + + Fixes <https://savannah.gnu.org/bugs/?63921>. Thanks to Eloi + Montañés. + 2023-03-13 G. Branden Robinson <g.branden.robin...@gmail.com> [docs]: Add Spanish language support (4/5). diff --git a/src/roff/groff/tests/localization_works.sh b/src/roff/groff/tests/localization_works.sh index 24cc6dcb0..a6f68b672 100755 --- a/src/roff/groff/tests/localization_works.sh +++ b/src/roff/groff/tests/localization_works.sh @@ -40,6 +40,10 @@ echo "testing English localization" >&2 OUTPUT=$(echo "$DOC" | "$groff" -Tascii -m en) echo "$OUTPUT" | grep -qx english +echo "testing Spanish localization" >&2 +OUTPUT=$(echo "$DOC" | "$groff" -Tascii -m es) +echo "$OUTPUT" | grep -qx spanish + echo "testing French localization" >&2 OUTPUT=$(echo "$DOC" | "$groff" -Tascii -m fr) echo "$OUTPUT" | grep -qx french diff --git a/tmac/tests/e_ld-works.sh b/tmac/tests/e_ld-works.sh index 4af1f5f76..06e833008 100755 --- a/tmac/tests/e_ld-works.sh +++ b/tmac/tests/e_ld-works.sh @@ -46,6 +46,8 @@ wail () { output=$(printf "%s\n" "$input" | "$groff" -Tascii -P-cbou -me) 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_es=$(printf "%s\n" "$input" \ + | "$groff" -Tutf8 -P-cbou -me -mes -a) 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" \ @@ -92,6 +94,18 @@ echo "$output_de" | grep -Eqx ' +Kapitel 1' || wail echo 'checking for correct German "Appendix" string' >&2 echo "$output_de" | grep -Eqx ' +Anhang A' || wail +# Spanish localization +echo "$output_es" +echo 'checking that `td` string updated correctly for Spanish' >&2 +echo "$output_es" \ + | grep -q 'The day was lunes, 15 de diciembre de 2008\.$' || wail + +echo 'checking for correct Spanish "Chapter" string' >&2 +echo "$output_es" | grep -Eqx " +Cap<'i>tulo 1" || wail + +echo 'checking for correct Spanish "Appendix" string' >&2 +echo "$output_es" | grep -Eqx ' +Anexo A' || wail + # French localization echo 'checking that `td` string updated correctly for French (1)' >&2 echo "$output_fr" | grep -q 'The day was Lundi, 15 D' _______________________________________________ Groff-commit mailing list Groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit