[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 11/14: [grotty]: Skip part of test if no UTF-8 support.
From: |
G. Branden Robinson |
Subject: |
[groff] 11/14: [grotty]: Skip part of test if no UTF-8 support. |
Date: |
Mon, 24 Jan 2022 10:28:41 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit 4115620b4d10d0d2b1d45eb9ceca2825e742579d
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sun Jan 23 22:34:08 2022 +1100
[grotty]: Skip part of test if no UTF-8 support.
* src/devices/grotty/tests/basic_latin_glyphs_map_correctly.sh: Skip
test of 'utf8' output device if locale lacks UTF-8 support. But if
the 'ascii' or 'latin1' test cases have already failed, report that
instead.
Fixes <https://savannah.gnu.org/bugs/?61891>. Thanks to Bjarni
Ingi Gislason for the report.
---
ChangeLog | 12 ++++++++++++
.../grotty/tests/basic_latin_glyphs_map_correctly.sh | 15 +++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index d7f8b414..7e4e0c10 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,6 +14,18 @@
* src/devices/gropdf/gropdf.pl: A fix to importing pdf
versions > 1.4.
+2022-01-23 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [grotty]: Skip part of test if locale doesn't support UTF-8.
+
+ * src/devices/grotty/tests/basic_latin_glyphs_map_correctly.sh:
+ Skip test of 'utf8' output device if locale lacks UTF-8 support.
+ But if the 'ascii' or 'latin1' test cases have already failed,
+ report that instead.
+
+ Fixes <https://savannah.gnu.org/bugs/?61891>. Thanks to Bjarni
+ Ingi Gislason for the report.
+
2022-01-23 Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
[man pages]: Fix typos.
diff --git a/src/devices/grotty/tests/basic_latin_glyphs_map_correctly.sh
b/src/devices/grotty/tests/basic_latin_glyphs_map_correctly.sh
index 00123f5d..a5e9e654 100755
--- a/src/devices/grotty/tests/basic_latin_glyphs_map_correctly.sh
+++ b/src/devices/grotty/tests/basic_latin_glyphs_map_correctly.sh
@@ -118,6 +118,21 @@ x stop'
for D in ascii latin1 utf8
do
+ if [ "$D" = "utf8" ]
+ then
+ # We can't test UTF-8 if the environment doesn't support it.
+ if [ "$(locale charmap)" != UTF-8 ]
+ then
+ # If we've already seen a failure case, report it.
+ if [ -n "$fail" ]
+ then
+ exit 1 # fail
+ else
+ exit 77 # skip
+ fi
+ fi
+ fi
+
printf 'checking "%s" output device...' $D >&2
output=$(echo "$input" | sed s/@DEVICE@/$D/ \
| "$grotty" -F font -F build/font)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 11/14: [grotty]: Skip part of test if no UTF-8 support.,
G. Branden Robinson <=