summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoão Távora <joaotavora@gmail.com>2018-05-22 22:40:48 +0100
committerJoão Távora <joaotavora@gmail.com>2018-05-22 23:05:17 +0100
commitc73e6a3111bc53d213467479984f72cfed674c6f (patch)
tree1d45db7db4d75155c538c0aec1453107e42f60e8
parente18600dfbd31316f30cf98f6d7a90aad33bc1981 (diff)
downloademacs-c73e6a3111bc53d213467479984f72cfed674c6f.tar.gz
More helpful docstrings for tests of electric-tests.el
* test/lisp/electric-tests.el (electric-pair-define-test-form): Improve automatically generated docstring.
-rw-r--r--test/lisp/electric-tests.el28
1 files changed, 22 insertions, 6 deletions
diff --git a/test/lisp/electric-tests.el b/test/lisp/electric-tests.el
index 60191bfbbaa..2f64b2c08e5 100644
--- a/test/lisp/electric-tests.el
+++ b/test/lisp/electric-tests.el
@@ -114,14 +114,30 @@
mode
extra-desc))
()
- ,(format "With |%s|, try input %c at point %d. \
-Should %s |%s| and point at %d"
+ ,(format "Electricity test in a `%s' buffer.\n
+Start with point at %d in a %d-char-long buffer
+like this one:
+
+ |%s| (buffer start and end are denoted by `|')
+%s
+%s
+Now press the key for: %c
+
+The buffer's contents should %s:
+
+ |%s|
+
+, and point should be at %d."
+ mode
+ (1+ pos)
+ (length fixture)
fixture
+ (if fixture-fn (format "\nNow call this:\n\n%s"
+ (pp-to-string fixture-fn)) "")
+ (if bindings (format "\nEnsure the following bindings:\n\n%s"
+ (pp-to-string bindings)) "")
char
- (1+ pos)
- (if (string= fixture expected-string)
- "stay"
- "become")
+ (if (string= fixture expected-string) "stay" "become")
(replace-regexp-in-string "\n" "\\\\n" expected-string)
expected-point)
(electric-pair-test-for ,fixture