From 7ca9809cdbfe326294a5d8c64b4b8c59d0e76bea Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 13 May 2024 16:30:31 +0200 Subject: tests: Skip ‘terminal-string-width’ test on encodings other than UTF-8. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * tests/syscalls.scm ("terminal-string-width Japanese"): Skip when the encoding of (current-output-port) is not UTF-8. Reported-by: Ashvith Shetty Change-Id: Ic284dd088d6b148d6fcb457290a28fdb0838b83d --- tests/syscalls.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/syscalls.scm b/tests/syscalls.scm index 340c1147de..7cf67c060d 100644 --- a/tests/syscalls.scm +++ b/tests/syscalls.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès +;;; Copyright © 2014-2021, 2024 Ludovic Courtès ;;; Copyright © 2015 David Thompson ;;; Copyright © 2020 Simon South ;;; Copyright © 2020 Mathieu Othacehe @@ -587,6 +587,8 @@ 5 (terminal-string-width "hello")) +;; The following test requires a Unicode-capable locale encoding. +(test-skip (if (string=? (port-encoding (current-output-port)) "UTF-8") 0 1)) (test-equal "terminal-string-width Japanese" 6 (terminal-string-width "今日は")) -- cgit v1.2.3