summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2023-07-19 15:53:28 +0200
committerRicardo Wurmus <rekado@elephly.net>2023-07-19 15:53:28 +0200
commitb9bd1bcce995299065252e192c96ae302c9b0e81 (patch)
tree8add1afbca906486a97e64342d1537ef1f96478c /tests
parent5566f691a28789e8a73be3b9549db0296b30c665 (diff)
downloadguix-b9bd1bcce995299065252e192c96ae302c9b0e81.tar.gz
import/utils: beautify-description: Wrap class names in @code{...}.
* guix/import/utils.scm (beautify-description): Add procedure to wrap words in
@code{...} markup.
* tests/import-utils.scm: Add two tests.
Diffstat (limited to 'tests')
-rw-r--r--tests/import-utils.scm10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/import-utils.scm b/tests/import-utils.scm
index 1565dd610a..7b078eac05 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, 2022 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015, 2017, 2022, 2023 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>
@@ -53,6 +53,14 @@ Differences are hard to spot, e.g. in CLOS vs. GOOPS."))
   "This @@ is not Texinfo syntax.  Neither is this %@@>%."
   (beautify-description "This @ is not Texinfo syntax.  Neither is this %@>%."))
 
+(test-equal "beautify-description: wrap PascalCase words in @code"
+  "The term @code{DelayedMatrix} refers to a class."
+  (beautify-description "The term DelayedMatrix refers to a class."))
+
+(test-equal "beautify-description: do not wrap acronyms in @code"
+  "The term API is not code, but @code{myAPI} might be."
+  (beautify-description "The term API is not code, but myAPI might be."))
+
 (test-equal "license->symbol"
   'license:lgpl2.0
   (license->symbol license:lgpl2.0))