mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 13:10:33 +02:00
import/utils: beautify-description: Validate argument.
* guix/import/utils.scm (beautify-description): Fix broken check for non-strings. Add a check for empty strings. * tests/import-utils.scm: Add two tests. Change-Id: Idf86df02aeb850fcc8808b7c9251082c1f816656 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
committed by
Ludovic Courtès
parent
47a5cd9f9c
commit
0772d36076
@@ -31,6 +31,16 @@
|
||||
|
||||
(test-begin "import-utils")
|
||||
|
||||
(test-equal "beautify-description: empty string"
|
||||
"This package lacks a description. Run \
|
||||
\"info '(guix) Synopses and Descriptions'\" for more information."
|
||||
(beautify-description ""))
|
||||
|
||||
(test-equal "beautify-description: not a string"
|
||||
"This package lacks a description. Run \
|
||||
\"info '(guix) Synopses and Descriptions'\" for more information."
|
||||
(beautify-description '()))
|
||||
|
||||
(test-equal "beautify-description: use double spacing"
|
||||
"\
|
||||
Trust me Mr. Hendrix, M. Night Shyamalan et al. \
|
||||
|
||||
Reference in New Issue
Block a user