diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2019-11-14 14:42:39 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2019-11-14 14:44:42 -0800 |
commit | c2cd8e6265b78a5f0be3335ea6d8868e80814db0 (patch) | |
tree | 0934435db848e080e14d46fa823456145616506b /test/src | |
parent | 2241f7ca7adb8aa7d785174dec0280a07cd16479 (diff) | |
download | emacs-c2cd8e6265b78a5f0be3335ea6d8868e80814db0.tar.gz |
Fix byte-counting error in ‘format’
Problem reported by Paul Pogonyshev (Bug#38191).
* src/editfns.c (styled_format): When checking for adjacent
%-sequences, use byte position rather than character position.
* test/src/editfns-tests.el (format-properties): Test for fix.
Diffstat (limited to 'test/src')
-rw-r--r-- | test/src/editfns-tests.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/src/editfns-tests.el b/test/src/editfns-tests.el index a1060808f66..238fb409f0b 100644 --- a/test/src/editfns-tests.el +++ b/test/src/editfns-tests.el @@ -90,6 +90,10 @@ (propertize "45" 'face 'italic))) #("012345 " 0 2 (face bold) 2 4 (face underline) 4 10 (face italic)))) + ;; Bug #38191 + (should (ert-equal-including-properties + (format (propertize "‘foo’ %s bar" 'face 'bold) "xxx") + #("‘foo’ xxx bar" 0 13 (face bold)))) ;; Bug #32404 (should (ert-equal-including-properties (format (concat (propertize "%s" 'face 'bold) |