diff options
| author | Wilfred Hughes <me@wilfred.me.uk> | 2018-04-07 11:23:54 +0100 |
|---|---|---|
| committer | Wilfred Hughes <me@wilfred.me.uk> | 2018-04-07 11:23:54 +0100 |
| commit | 64dee8141ccb47494dc469153ff6447ade948646 (patch) | |
| tree | cd200d8744d80e8b2f719e79dbaa0e681bdc811d /test | |
| parent | 5b487625d04bdbbf63b5bd12368f926ad446d4e9 (diff) | |
Add unit test for linkifying URLs
Diffstat (limited to 'test')
| -rw-r--r-- | test/unit-test.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit-test.el b/test/unit-test.el index f232569..0309876 100644 --- a/test/unit-test.el +++ b/test/unit-test.el @@ -229,6 +229,16 @@ symbol (not a form)." (should (get-text-property paren-position 'button formatted)))) +(ert-deftest helpful--format-docstring--url () + "Ensure we propertize URLs." + ;; This is the typical format. + (let* ((formatted (helpful--format-docstring "URL `http://example.com'")) + (url-position (s-index-of "h" formatted))) + (should + (string-equal formatted "URL http://example.com")) + (should + (get-text-property url-position 'button formatted)))) + (ert-deftest helpful--definition-c-vars () "Handle definitions of variables in C source code." (let* ((emacs-src-path (f-join default-directory "emacs-25.3" "src"))) |
