diff options
| author | Paul Eggert | 2015-08-27 08:50:22 -0700 |
|---|---|---|
| committer | Paul Eggert | 2015-08-27 08:52:02 -0700 |
| commit | 6dbe056b9beec0b9ff6c84331a49c568408dbbaa (patch) | |
| tree | 32a6e13fcb20634d9986324e9dc973713cd7be96 /test | |
| parent | f33c164123e2bc46c4d06853b1a32130126d54c8 (diff) | |
| download | emacs-6dbe056b9beec0b9ff6c84331a49c568408dbbaa.tar.gz emacs-6dbe056b9beec0b9ff6c84331a49c568408dbbaa.zip | |
Add test case for ‘format’ bug and refactor
* src/editfns.c (styled_format): Refactor internally, mostly by
moving declarations closer to uses. This should not affect behavior.
* test/automated/textprop-tests.el (textprop-tests-format): New test.
Diffstat (limited to 'test')
| -rw-r--r-- | test/automated/textprop-tests.el | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/automated/textprop-tests.el b/test/automated/textprop-tests.el index 310a7a0e976..f6604fb8ff5 100644 --- a/test/automated/textprop-tests.el +++ b/test/automated/textprop-tests.el | |||
| @@ -24,6 +24,18 @@ | |||
| 24 | 24 | ||
| 25 | (require 'ert) | 25 | (require 'ert) |
| 26 | 26 | ||
| 27 | (ert-deftest textprop-tests-format () | ||
| 28 | "Test ‘format’ with text properties." | ||
| 29 | ;; See Bug#21351. | ||
| 30 | (should (equal-including-properties | ||
| 31 | (format #("mouse-1, RET: %s -- w: copy %s" | ||
| 32 | 12 20 (face minibuffer-prompt) | ||
| 33 | 21 30 (face minibuffer-prompt)) | ||
| 34 | "visit" "link") | ||
| 35 | #("mouse-1, RET: visit -- w: copy link" | ||
| 36 | 12 23 (face minibuffer-prompt) | ||
| 37 | 24 35 (face minibuffer-prompt))))) | ||
| 38 | |||
| 27 | (ert-deftest textprop-tests-font-lock--remove-face-from-text-property () | 39 | (ert-deftest textprop-tests-font-lock--remove-face-from-text-property () |
| 28 | "Test `font-lock--remove-face-from-text-property'." | 40 | "Test `font-lock--remove-face-from-text-property'." |
| 29 | (let* ((string "foobar") | 41 | (let* ((string "foobar") |