diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2024-05-13 16:30:31 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2024-05-13 16:31:35 +0200 |
| commit | 7ca9809cdbfe326294a5d8c64b4b8c59d0e76bea (patch) | |
| tree | f15cf3ba4864080313c736fb1772069080ce7a89 /tests | |
| parent | 723d45866f11b1aceb23d9d3d66c395ea9bf257b (diff) | |
tests: Skip ‘terminal-string-width’ test on encodings other than UTF-8.
* tests/syscalls.scm ("terminal-string-width Japanese"): Skip when the
encoding of (current-output-port) is not UTF-8.
Reported-by: Ashvith Shetty <ashvithshetty10@gmail.com>
Change-Id: Ic284dd088d6b148d6fcb457290a28fdb0838b83d
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/syscalls.scm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/syscalls.scm b/tests/syscalls.scm index 340c1147de8..7cf67c060d4 100644 --- a/tests/syscalls.scm +++ b/tests/syscalls.scm | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org> | 2 | ;;; Copyright © 2014-2021, 2024 Ludovic Courtès <ludo@gnu.org> |
| 3 | ;;; Copyright © 2015 David Thompson <davet@gnu.org> | 3 | ;;; Copyright © 2015 David Thompson <davet@gnu.org> |
| 4 | ;;; Copyright © 2020 Simon South <simon@simonsouth.net> | 4 | ;;; Copyright © 2020 Simon South <simon@simonsouth.net> |
| 5 | ;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com> | 5 | ;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com> |
| @@ -587,6 +587,8 @@ | |||
| 587 | 5 | 587 | 5 |
| 588 | (terminal-string-width "hello")) | 588 | (terminal-string-width "hello")) |
| 589 | 589 | ||
| 590 | ;; The following test requires a Unicode-capable locale encoding. | ||
| 591 | (test-skip (if (string=? (port-encoding (current-output-port)) "UTF-8") 0 1)) | ||
| 590 | (test-equal "terminal-string-width Japanese" | 592 | (test-equal "terminal-string-width Japanese" |
| 591 | 6 | 593 | 6 |
| 592 | (terminal-string-width "今日は")) | 594 | (terminal-string-width "今日は")) |
