aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorWilfred Hughes <me@wilfred.me.uk>2019-08-13 19:21:09 +0100
committerWilfred Hughes <me@wilfred.me.uk>2019-08-14 04:08:25 +0100
commite3d8ee7fe4219d4172c3c9c0eddd4f3f9f051061 (patch)
tree8e52aed5e1c43f3f8a7e593d65aed6c3d4f45e60 /test
parent69474e9c49076ce82cea4eff237933b6cec0b5cf (diff)
Use "and" in summaries
For example, say "ace-window is an autoloaded, interactive and compiled function" rather than comma-separating everywhere. Also simplify button logic and add a test for "an" in descriptions.
Diffstat (limited to 'test')
-rw-r--r--test/helpful-unit-test.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/helpful-unit-test.el b/test/helpful-unit-test.el
index 87ef40f..5dc0c63 100644
--- a/test/helpful-unit-test.el
+++ b/test/helpful-unit-test.el
@@ -782,6 +782,17 @@ find the source code."
(should
(s-starts-with-p "if is a special form defined in" summary))))
+(defun helpful-test-fn-interactive ()
+ (interactive))
+
+(ert-deftest helpful--summary--interactive-fn ()
+ "Ensure we use \"an\" for interactive functions."
+ (let* ((summary (helpful--summary 'helpful-test-fn-interactive t nil nil)))
+ ;; Strip properties to make assertion messages more readable.
+ (set-text-properties 0 (1- (length summary)) nil summary)
+ (should
+ (s-starts-with-p "helpful-test-fn-interactive is an interactive function" summary))))
+
(defun helpful-test-fn-with\ space ()
42)