unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* 4dc72dd9deb1c3394ada3de3f52bc7c1ff831ab6 breaks make check
@ 2021-01-16  6:33 Jared Finder via Emacs development discussions.
  2021-01-16  6:38 ` Aaron Jensen
  0 siblings, 1 reply; 4+ messages in thread
From: Jared Finder via Emacs development discussions. @ 2021-01-16  6:33 UTC (permalink / raw)
  To: emacs-devel, aaronjensen

"4dc72dd9deb1c3394ada3de3f52bc7c1ff831ab6 Fix 'window-text-pixel-size' 
when there are leading/trailing spaces" adds some tests that don't run 
correctly in my environment.  The tests do run fine interactively.

The output log:

Test xdisp-tests--window-text-pixel-size backtrace:
   make-terminal-frame(((parent-frame . #<frame F1 0x56424bb8b2c8>)))
   tty-create-frame-with-faces(((parent-frame . #<frame F1 0x56424bb8b2
   #f(compiled-function (params) #<bytecode 0x6b0cf7c833dbfd2>)(((paren
   apply(#f(compiled-function (params) #<bytecode 0x6b0cf7c833dbfd2>) (
   frame-creation-function(((parent-frame . #<frame F1 0x56424bb8b2c8>)
   make-frame(((parent-frame . #<frame F1 0x56424bb8b2c8>)))
   display-buffer-in-child-frame(#<killed buffer> nil)
   display-buffer(#<killed buffer> (display-buffer-in-child-frame))
   #f(compiled-function () #<bytecode -0x18c672b9d813486f>)()
   ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
   ert-run-test(#s(ert-test :name xdisp-tests--window-text-pixel-size :
   ert-run-or-rerun-test(#s(ert--stats :selector (not (or ... ...)) :te
   ert-run-tests((not (or (tag :expensive-test) (tag :unstable))) #f(co
   ert-run-tests-batch((not (or (tag :expensive-test) (tag :unstable)))
   ert-run-tests-batch-and-exit((not (or (tag :expensive-test) (tag :un
   eval((ert-run-tests-batch-and-exit '(not (or (tag :expensive-test) (
   command-line-1(("-L" ":." "-l" "ert" "-l" "src/xdisp-tests" "--eval"
   command-line()
   normal-top-level()
Test xdisp-tests--window-text-pixel-size condition:
     (error "Unknown terminal type")

xdisp-tests--window-text-pixel-size-leading-space and 
xdisp-tests--window-text-pixel-size-trailing-space fail in the same way.

I don't know if these tests should just be marked expected to fail or 
not.

   -- MJF



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 4dc72dd9deb1c3394ada3de3f52bc7c1ff831ab6 breaks make check
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Aaron Jensen @ 2021-01-16  6:38 UTC (permalink / raw)
  To: Jared Finder, Eli Zaretskii; +Cc: emacs-devel

On Sat, Jan 16, 2021 at 12:33 AM Jared Finder <jared@finder.org> wrote:
>
> "4dc72dd9deb1c3394ada3de3f52bc7c1ff831ab6 Fix 'window-text-pixel-size'
> when there are leading/trailing spaces" adds some tests that don't run
> correctly in my environment.  The tests do run fine interactively.
>

Yes, Eli mentioned this in the bug thread. I don't know how to make
these tests pass in batch mode. I modified it to something that seems
like it should pass in batch mode, but I get a size of 0x0, which
isn't what I'm going for.

This is what I tried:

(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.

Thanks,

Aaron



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 4dc72dd9deb1c3394ada3de3f52bc7c1ff831ab6 breaks make check
  2021-01-16  6:38 ` Aaron Jensen
@ 2021-01-16  8:42   ` Eli Zaretskii
  2021-01-16 17:14     ` Aaron Jensen
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2021-01-16  8:42 UTC (permalink / raw)
  To: Aaron Jensen; +Cc: jared, emacs-devel

> 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)))))



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 4dc72dd9deb1c3394ada3de3f52bc7c1ff831ab6 breaks make check
  2021-01-16  8:42   ` Eli Zaretskii
@ 2021-01-16 17:14     ` Aaron Jensen
  0 siblings, 0 replies; 4+ messages in thread
From: Aaron Jensen @ 2021-01-16 17:14 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Jared Finder, emacs-devel

On Sat, Jan 16, 2021 at 2:42 AM Eli Zaretskii <eliz@gnu.org> wrote:
>
> This works for me, both interactively and in batch:

Ah! I don't need to control the window directly at all. Thank you. I
emailed a patch to the original bug.

Thanks,

Aaron



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-16 17:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2021-01-16 17:14     ` Aaron Jensen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).