diff options
author | Morgan Smith <Morgan.J.Smith@outlook.com> | 2025-04-07 16:53:52 -0400 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2025-04-15 10:21:33 +0200 |
commit | 0772d36076d686895a43063cdaf18039b2e5d713 (patch) | |
tree | 2e5ee59ddb63aa8a3eb9e03c17b4075a5cd1beb2 /tests | |
parent | 47a5cd9f9c0c42da47068f6b568061dd289a57a4 (diff) |
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>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/import-utils.scm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/import-utils.scm b/tests/import-utils.scm index 221866e871..273f18254e 100644 --- a/tests/import-utils.scm +++ b/tests/import-utils.scm @@ -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. \ |