aboutsummaryrefslogtreecommitdiff
path: root/test/helpful-unit-test.el
diff options
context:
space:
mode:
authorWilfred Hughes <me@wilfred.me.uk>2019-03-15 09:54:45 +0000
committerWilfred Hughes <me@wilfred.me.uk>2019-03-16 15:26:36 +0000
commit9f1d08c3d4292f778b14838da35701714ea0e231 (patch)
tree0b4a22ec05940b3327792a5373e00e2b529bd0cf /test/helpful-unit-test.el
parentd155add4af76df4b342250dec7ced57f58400465 (diff)
Don't interpret command references inside doublequoted strings
Helps with #197
Diffstat (limited to 'test/helpful-unit-test.el')
-rw-r--r--test/helpful-unit-test.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/helpful-unit-test.el b/test/helpful-unit-test.el
index 4f2379b..6d1e42d 100644
--- a/test/helpful-unit-test.el
+++ b/test/helpful-unit-test.el
@@ -65,6 +65,16 @@
(should
(not (s-contains-p "\\=" formatted-docstring)))))
+(ert-deftest helpful--docstring-strings ()
+ "Double-quoted strings should be treated literally."
+ (let* ((formatted-docstring
+ (helpful--format-docstring
+ "hello \"\\[foo]\" world")))
+ ;; This test will fail in a local Emacs instance that has modified
+ ;; minibuffer keybindings.
+ (should
+ (string-equal formatted-docstring "hello \"\\[foo]\" world"))))
+
(ert-deftest helpful--docstring-keymap ()
"Handle keymap references in docstrings."
(let* ((formatted-docstring