diff options
| author | Wilfred Hughes <me@wilfred.me.uk> | 2019-01-13 18:51:47 +0000 |
|---|---|---|
| committer | Wilfred Hughes <me@wilfred.me.uk> | 2019-01-13 18:52:34 +0000 |
| commit | cf24f963bd77f679f09057c55c6a4683b3f3a5cb (patch) | |
| tree | d78015e2fc5fa688aa4dda495c2f341f1903ac37 /test | |
| parent | 751caad20387c55ae8dc3f7cfa8f638a4d2d3ad5 (diff) | |
Read and display symbols with spaces correctly
Fixes #172
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 0ab830f..cff43fc 100644 --- a/test/helpful-unit-test.el +++ b/test/helpful-unit-test.el @@ -371,6 +371,12 @@ variables defined without `defvar'." (equal (helpful--signature 'some-unused-function) "(some-unused-function [Arg list not available until function definition is loaded.])"))) +(ert-deftest helpful--signature-space () + "Ensure that symbols with spaces are handled correctly." + (should + (equal (helpful--signature 'helpful-test-fn-with\ space) + "(helpful-test-fn-with\\ space)"))) + (ert-deftest helpful--signature--advertised () "Ensure that we respect functions that declare `advertised-calling-convention'." (should @@ -705,6 +711,17 @@ find the source code." (should (s-starts-with-p "if is a special form defined in" summary)))) +(defun helpful-test-fn-with\ space () + 42) + +(ert-deftest helpful--summary--symbol-with-space () + "Ensure we correctly format symbols containing spaces." + (let* ((summary (helpful--summary 'helpful-test-fn-with\ space 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-with\\ space is a function" summary)))) + (ert-deftest helpful--bound-p () ;; Functions. (should (helpful--bound-p 'message)) |
