gbranden pushed a commit to branch master
in repository groff.

commit 76af2cc9048f6eeb1831323734e7bb5aa798f953
Author: G. Branden Robinson <g.branden.robin...@gmail.com>
AuthorDate: Wed Jul 16 11:03:51 2025 -0500

    tmac/tests/localization-works.sh: Fix nits.
    
    * Format test inputs more readably.
    * Use preconv(1) and "utf8" rather than "ascii" output device when
      testing Japanese and Chinese language output.  We don't do textual
      comparisons, but this change eliminates spurious complaints when using
      `echo "$output"` to inspect test case outputs in detail.
---
 tmac/tests/localization-works.sh | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/tmac/tests/localization-works.sh b/tmac/tests/localization-works.sh
index 89c2af91b..0ec8742fd 100755
--- a/tmac/tests/localization-works.sh
+++ b/tmac/tests/localization-works.sh
@@ -164,31 +164,35 @@ echo "$output" | grep -Fqx '.hy=34' || wail
 # do with any language) is preserved when switching locales back from a
 # CJK language, since those languages' modes unconditionally clear it.
 
-input='.TH foo 1 2022-04-09 "groff test suite"
+input='.
+.TH foo 1 2022-04-09 "groff test suite"
 .SH 名前
 foo \- APT 用選択制御ファイル
 .mso en.tmac
 .TH bar 1 2022-04-09 "groff test suite"
 .SH Name
 bar \- three subjects walk into this
-.tm .hy=\n[.hy]'
+.tm .hy=\n[.hy]
+.'
 
-output=$(printf "%s\n" "$input" | "$groff" -Tascii -P-cbou -man -mja \
-  -men 2>&1)
+output=$(printf "%s\n" "$input" | "$groff" -K utf8 -Tutf8 -P-cbou \
+  -man -mja -men 2>&1)
 echo 'checking -man with -mja -men' >&2
 echo "$output" | grep -Fqx '.hy=6' || wail
 
-input='.TH foo 1 2022-04-09 "groff test suite"
+input='.
+.TH foo 1 2022-04-09 "groff test suite"
 .SH 名称
 foo \- 解析 man 手册页的头部信息
 .mso en.tmac
 .TH bar 1 2022-04-09 "groff test suite"
 .SH Name
 bar \- three subjects walk into this
-.tm .hy=\n[.hy]'
+.tm .hy=\n[.hy]
+.'
 
-output=$(printf "%s\n" "$input" | "$groff" -Tascii -P-cbou -man -mzh \
-  -men 2>&1)
+output=$(printf "%s\n" "$input" | "$groff" -K utf8 -Tutf8 -P-cbou \
+  -man -mzh -men 2>&1)
 echo 'checking -man with -mzh -men' >&2
 echo "$output" | grep -Fqx '.hy=6' || wail
 

_______________________________________________
groff-commit mailing list
groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to