From: Eli Zaretskii <eliz@gnu.org>
To: Aaron Jensen <aaronjensen@gmail.com>
Cc: jared@finder.org, emacs-devel@gnu.org
Subject: Re: 4dc72dd9deb1c3394ada3de3f52bc7c1ff831ab6 breaks make check
Date: Sat, 16 Jan 2021 10:42:40 +0200 [thread overview]
Message-ID: <838s8t9ssf.fsf@gnu.org> (raw)
In-Reply-To: <CAHyO48zNr98_r1OOHqS2-pv=UTci=GEQjFqa9ECK15nHJdzgwA@mail.gmail.com> (message from Aaron Jensen on Sat, 16 Jan 2021 00:38:37 -0600)
> From: Aaron Jensen <aaronjensen@gmail.com>
> Date: Sat, 16 Jan 2021 00:38:37 -0600
> Cc: emacs-devel@gnu.org
>
> (ert-deftest xdisp-tests--window-text-pixel-size () ;; bug#45748
> (with-current-buffer-window "*test*" 'display-buffer-same-window nil
> (erase-buffer)
> (insert "xxx")
> (let* ((char-width (frame-char-width))
> (size (window-text-pixel-size (get-buffer-window) t t)))
> (should (equal (/ (car size) char-width) 3)))))
>
> Eli mentioned moving the tests to manual/redisplay-testsuite.el, which is fine.
>
> If anyone else has an idea how to make this test work in batch mode,
> I'm all ears.
This works for me, both interactively and in batch:
(ert-deftest xdisp-tests--window-text-pixel-size ()
(with-current-buffer (generate-new-buffer "*test*")
(erase-buffer)
(insert "xxx")
(switch-to-buffer (current-buffer))
(let* ((char-width (frame-char-width))
(size (window-text-pixel-size nil t t)))
(should (equal (/ (car size) char-width) 3)))))
next prev parent reply other threads:[~2021-01-16 8:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-16 6:33 4dc72dd9deb1c3394ada3de3f52bc7c1ff831ab6 breaks make check Jared Finder via Emacs development discussions.
2021-01-16 6:38 ` Aaron Jensen
2021-01-16 8:42 ` Eli Zaretskii [this message]
2021-01-16 17:14 ` Aaron Jensen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=838s8t9ssf.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=aaronjensen@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=jared@finder.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.