aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2022-10-05 23:45:23 +0200
committerRicardo Wurmus <rekado@elephly.net>2022-10-05 23:59:48 +0200
commit421a87a68a992a78127e0c2f4aa2e18c731c9e63 (patch)
tree97f270f8d1eed5da817767f7f8b8fb9fbbc213d6 /tests
parent9be5f88e18c50df26e5482f80eb8fcbff9c588bd (diff)
downloadguix-421a87a68a992a78127e0c2f4aa2e18c731c9e63.tar
guix-421a87a68a992a78127e0c2f4aa2e18c731c9e63.tar.gz
tests: Add new test cases for beautify-description.
* tests/import-utils.scm ("beautify-description: use double spacing"): Update. ("beautify-description: remove single quotes", "beautify-description: escape @"): New tests.
Diffstat (limited to 'tests')
-rw-r--r--tests/import-utils.scm19
1 files changed, 16 insertions, 3 deletions
diff --git a/tests/import-utils.scm b/tests/import-utils.scm
index c47348fc60..026c48bb1e 100644
--- a/tests/import-utils.scm
+++ b/tests/import-utils.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015, 2017 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015, 2017, 2022 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
@@ -32,14 +32,27 @@
(test-begin "import-utils")
(test-equal "beautify-description: use double spacing"
- "This is a package. It is great. Trust me Mr. Hendrix."
+ "\
+Trust me Mr. Hendrix, M. Night Shyamalan et al. \
+Differences are hard to spot,
+e.g. in CLOS vs. GOOPS."
(beautify-description
- "This is a package. It is great. Trust me Mr. Hendrix."))
+ "
+Trust me Mr. Hendrix, M. Night Shyamalan et al. \
+Differences are hard to spot, e.g. in CLOS vs. GOOPS."))
(test-equal "beautify-description: transform fragment into sentence"
"This package provides a function to establish world peace"
(beautify-description "A function to establish world peace"))
+(test-equal "beautify-description: remove single quotes"
+ "CRAN likes to quote acronyms and function names."
+ (beautify-description "CRAN likes to 'quote' acronyms and 'function' names."))
+
+(test-equal "beautify-description: escape @"
+ "This @@ is not Texinfo syntax. Neither is this %@@>%."
+ (beautify-description "This @ is not Texinfo syntax. Neither is this %@>%."))
+
(test-equal "license->symbol"
'license:lgpl2.0
(license->symbol license:lgpl2.0))