diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2015-09-24 21:56:42 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2015-09-24 22:04:51 +0200 |
| commit | 08d7e3592faa93f508cd7f0c30199fe53c87892b (patch) | |
| tree | 9cd4ae44427b5e4466fbad91e530445a07282d85 /tests | |
| parent | 75726135ce017f37ae57181e011ceea95c56dd3a (diff) | |
ui: Gracefully handle Unicode description strings.
Fixes <http://bugs.gnu.org/21536>.
Reported by Alex Kost <alezost@gmail.com>.
* guix/ui.scm (texi->plain-text): Wrap body in 'with-fluids'.
* tests/ui.scm ("package-description-string vs. Unicode"): New test.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui.scm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui.scm b/tests/ui.scm index 25fc7094317..bd4c907525c 100644 --- a/tests/ui.scm +++ b/tests/ui.scm | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #:use-module (guix profiles) | 22 | #:use-module (guix profiles) |
| 23 | #:use-module (guix store) | 23 | #:use-module (guix store) |
| 24 | #:use-module (guix derivations) | 24 | #:use-module (guix derivations) |
| 25 | #:use-module (guix tests) | ||
| 25 | #:use-module (srfi srfi-1) | 26 | #:use-module (srfi srfi-1) |
| 26 | #:use-module (srfi srfi-11) | 27 | #:use-module (srfi srfi-11) |
| 27 | #:use-module (srfi srfi-19) | 28 | #:use-module (srfi srfi-19) |
| @@ -89,6 +90,12 @@ interface, and powerful string processing.") | |||
| 89 | (fill-paragraph "First line. | 90 | (fill-paragraph "First line. |
| 90 | Second line" 24)) | 91 | Second line" 24)) |
| 91 | 92 | ||
| 93 | (test-equal "package-description-string vs. Unicode" | ||
| 94 | "b•ll•t\n\n" ;see <http://bugs.gnu.org/21536> | ||
| 95 | (with-fluids ((%default-port-encoding "ISO-8859-1")) | ||
| 96 | (package-description-string | ||
| 97 | (dummy-package "foo" (description "b•ll•t"))))) | ||
| 98 | |||
| 92 | (test-equal "package-specification->name+version+output" | 99 | (test-equal "package-specification->name+version+output" |
| 93 | '(("guile" #f "out") | 100 | '(("guile" #f "out") |
| 94 | ("guile" "2.0.9" "out") | 101 | ("guile" "2.0.9" "out") |
