[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 49/74: [tests]: Add Spanish language support (5/5).
From: |
G. Branden Robinson |
Subject: |
[groff] 49/74: [tests]: Add Spanish language support (5/5). |
Date: |
Fri, 28 Apr 2023 15:10:48 -0400 (EDT) |
gbranden pushed a commit to branch branden-2023-04-28
in repository groff.
commit 1a03b441f28be6e3c1a4d1e9f5379e559951f0d7
Author: G. Branden Robinson <g.branden.robinson@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 d8a4a7303..163242e59 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2023-03-13 G. Branden Robinson <g.branden.robinson@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.robinson@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'
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 49/74: [tests]: Add Spanish language support (5/5).,
G. Branden Robinson <=