diff options
| author | João Távora | 2018-05-22 22:40:48 +0100 |
|---|---|---|
| committer | João Távora | 2018-05-22 23:05:17 +0100 |
| commit | c73e6a3111bc53d213467479984f72cfed674c6f (patch) | |
| tree | 1d45db7db4d75155c538c0aec1453107e42f60e8 | |
| parent | e18600dfbd31316f30cf98f6d7a90aad33bc1981 (diff) | |
| download | emacs-c73e6a3111bc53d213467479984f72cfed674c6f.tar.gz emacs-c73e6a3111bc53d213467479984f72cfed674c6f.zip | |
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.el | 28 |
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 @@ | |||
| 114 | mode | 114 | mode |
| 115 | extra-desc)) | 115 | extra-desc)) |
| 116 | () | 116 | () |
| 117 | ,(format "With |%s|, try input %c at point %d. \ | 117 | ,(format "Electricity test in a `%s' buffer.\n |
| 118 | Should %s |%s| and point at %d" | 118 | Start with point at %d in a %d-char-long buffer |
| 119 | like this one: | ||
| 120 | |||
| 121 | |%s| (buffer start and end are denoted by `|') | ||
| 122 | %s | ||
| 123 | %s | ||
| 124 | Now press the key for: %c | ||
| 125 | |||
| 126 | The buffer's contents should %s: | ||
| 127 | |||
| 128 | |%s| | ||
| 129 | |||
| 130 | , and point should be at %d." | ||
| 131 | mode | ||
| 132 | (1+ pos) | ||
| 133 | (length fixture) | ||
| 119 | fixture | 134 | fixture |
| 135 | (if fixture-fn (format "\nNow call this:\n\n%s" | ||
| 136 | (pp-to-string fixture-fn)) "") | ||
| 137 | (if bindings (format "\nEnsure the following bindings:\n\n%s" | ||
| 138 | (pp-to-string bindings)) "") | ||
| 120 | char | 139 | char |
| 121 | (1+ pos) | 140 | (if (string= fixture expected-string) "stay" "become") |
| 122 | (if (string= fixture expected-string) | ||
| 123 | "stay" | ||
| 124 | "become") | ||
| 125 | (replace-regexp-in-string "\n" "\\\\n" expected-string) | 141 | (replace-regexp-in-string "\n" "\\\\n" expected-string) |
| 126 | expected-point) | 142 | expected-point) |
| 127 | (electric-pair-test-for ,fixture | 143 | (electric-pair-test-for ,fixture |