all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Corwin Brust <corwin@bru.st>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 68919@debbugs.gnu.org
Subject: bug#68919: 30.0.50; etc/w32-feature.el: tests do not work under --batch
Date: Sun, 4 Feb 2024 09:25:32 -0600	[thread overview]
Message-ID: <CAJf-WoQ54tuQNjTK_H+vUCCA8KKpbQxbbkEVDsSYkFBF7Vw1FQ@mail.gmail.com> (raw)
In-Reply-To: <86h6io3dvb.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 498 bytes --]

On Sun, Feb 4, 2024 at 1:08 AM Eli Zaretskii <eliz@gnu.org> wrote:
>
> We can do better than this, I think.  The following works in batch
> mode:
>
>   emacs -batch --eval "(message \"%s\" (get 'uniscribe 'font-driver-superseded-by))"
>    => harfbuzz
>

Thank you, Eli - let me know if this is better.  (Should we continue
using frame-parameters in when display-graphic-p is t?  I assume not;
this works in both cases and is thus better because it's simpler, or
so I have thought.)

[-- Attachment #2: 0001-etc-w32-feature.el-harfbuzz-improve-test.patch --]
[-- Type: application/octet-stream, Size: 880 bytes --]

From 6ea7ff780437d3abeb768f8ba1f6ee21b9d70d18 Mon Sep 17 00:00:00 2001
From: Corwin Brust <corwin@bru.st>
Date: Sat, 3 Feb 2024 20:54:29 -0600
Subject: [PATCH] ; etc/w32-feature.el (harfbuzz): improve test

This enable the tests to be used with batch (Bug#68919), e.g.

emacs.exe -l etc/w32-feature.el --batch -eval \
  '(ert-run-tests-batch-and-exit)'
---
 etc/w32-feature.el | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/etc/w32-feature.el b/etc/w32-feature.el
index 8d36e32e0fb..08124d396cb 100644
--- a/etc/w32-feature.el
+++ b/etc/w32-feature.el
@@ -46,9 +46,7 @@ feature-optimization
 
 (ert-deftest feature-harfbuzz ()
   (should
-   (eq
-    'harfbuzz
-    (car (frame-parameter nil 'font-backend)))))
+   (eq 'harfbuzz (get 'uniscribe 'font-driver-superseded-by))))
 
 (ert-deftest feature-gnutls ()
   (should (gnutls-available-p)))
-- 
2.36.1


  reply	other threads:[~2024-02-04 15:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-04  3:37 bug#68919: 30.0.50; etc/w32-feature.el: tests do not work under --batch Corwin Brust
2024-02-04  3:41 ` corwin
2024-02-04  7:08   ` Eli Zaretskii
2024-02-04 15:25     ` Corwin Brust [this message]
2024-02-04 15:34       ` Eli Zaretskii

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=CAJf-WoQ54tuQNjTK_H+vUCCA8KKpbQxbbkEVDsSYkFBF7Vw1FQ@mail.gmail.com \
    --to=corwin@bru.st \
    --cc=68919@debbugs.gnu.org \
    --cc=eliz@gnu.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.