diff options
| author | Wilfred Hughes <me@wilfred.me.uk> | 2019-08-13 19:36:28 +0100 |
|---|---|---|
| committer | Wilfred Hughes <me@wilfred.me.uk> | 2019-08-14 04:08:25 +0100 |
| commit | e9e958a5643619d0e32b9934bf4e9195c57cb71f (patch) | |
| tree | 2ff5e8339c2ead5e682ae7b87f14a523d8f5bcb0 /test | |
| parent | e3d8ee7fe4219d4172c3c9c0eddd4f3f9f051061 (diff) | |
Ensure ? in symbols isn't needlessly escaped
Diffstat (limited to 'test')
| -rw-r--r-- | test/helpful-unit-test.el | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/helpful-unit-test.el b/test/helpful-unit-test.el index 5dc0c63..14d44dc 100644 --- a/test/helpful-unit-test.el +++ b/test/helpful-unit-test.el @@ -793,6 +793,23 @@ find the source code." (should (s-starts-with-p "helpful-test-fn-interactive is an interactive function" summary)))) +(defun helpful-test-fn? () + (interactive)) + +(ert-deftest helpful--summary--fn-with-? () + "Ensure we use don't needlessly escape ? in function names." + (let* ((summary (helpful--summary 'helpful-test-fn? 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? is" summary)))) + +(ert-deftest helpful--signature-fn-with? () + "Ensure that symbols with question marks are handled correctly." + (should + (equal (helpful--signature 'helpful-test-fn?) + "(helpful-test-fn?)"))) + (defun helpful-test-fn-with\ space () 42) |
