Re: emacs-31 10ae134ceba: ; Add new text for xdisp.c
Sean Whitton <[email protected]>
| Newsgroups | gmane.emacs.devel |
|---|---|
| Message-ID | <[email protected]> |
Eli Zaretskii [28/Jun 11:33am -04] wrote: > branch: emacs-31 > commit 10ae134ceba5f22c40dd1dc8ceb1f4f184760032 > Author: Eli Zaretskii <[email protected]> > Commit: Eli Zaretskii <[email protected]> > > ; Add new text for xdisp.c > > * test/src/xdisp-tests.el (xdisp-test-format-mode-line): Add > another test for 'format-mode-line'. (Bug#81313) > --- > test/src/xdisp-tests.el | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > > diff --git a/test/src/xdisp-tests.el b/test/src/xdisp-tests.el > index 04dcfd6f59f..f3df858e218 100644 > --- a/test/src/xdisp-tests.el > +++ b/test/src/xdisp-tests.el > @@ -196,6 +196,19 @@ int main () { > (text-properties-at > 0 > (format-mode-line '((:propertize "Hello!" face bold)) 'mode-line)) > - (list 'face '(bold mode-line) 'mode-line-elt-no 3)))) > + (list 'face '(bold mode-line) 'mode-line-elt-no 3))) > + (with-temp-buffer > + ;; This test is due to Markus Triska <[email protected]>. > + (let ((m1 (format-mode-line mode-line-format nil)) > + (m2 (format-mode-line mode-line-format 'default)) > + s1 s2) > + (font-lock-mode 0) > + (insert "\n") > + (insert m1) > + (setq s1 (window-text-pixel-size nil (line-beginning-position) (point))) > + (insert "\n") > + (insert m2) > + (setq s2 (window-text-pixel-size nil (line-beginning-position) (point))) > + (should (equal m1 m2))))) > > ;;; xdisp-tests.el ends here > This results in In toplevel form: src/xdisp-tests.el:204:11: Warning: Unused lexical variable ‘s1’ src/xdisp-tests.el:204:14: Warning: Unused lexical variable ‘s2’ and indeed it does seem like the values are never used. Should the final assertion be about s1 and s2 instead of m1 and m2 ? -- Sean Whitton