emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tests, Emacs-25 and Conditional Features


From: Phillip Lord
Subject: Re: Tests, Emacs-25 and Conditional Features
Date: Fri, 18 Mar 2016 10:41:28 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> From: address@hidden (Phillip Lord)
>> Date: Thu, 17 Mar 2016 10:14:44 +0000
>> Cc: address@hidden
>> 
>> > (skip-unless (gnutls-available-p))
>> > (skip-unless (functionp 'libxml-parse-xml-region))
>> 
>> Yeah, thought about that. But then the test is skipped if
>> gnutls-available-p returns nil. What happens if I believe that I have
>> configured and build Emacs to include gnutls, but, for some reason it
>> isn't. The test will be skipped when it should succeed.
>
> Tests that are skipped are indicated in the test log file, so if you
> see there a feature being skipped that you thought should be
> available, you can investigate.
>
> More generally, I don't see how Emacs could know what you believe.  We
> need to define the meaning of that first, and then find a way to
> communicate that to Emacs.


Something like

(skip-unless (or (gnutls-available-p) conditional-feature-force))

So, we pick have a standard test selector which means "all the
conditional features should be expected to be on". Probably, you would
want "all the conditional features that are supposed to be on by
default, should be expected to be on"


> Then there's the issue of how do you test this.  An API that was not
> compiled into Emacs cannot be invoked, so what do we want to show the
> user? a "void function" error? ert error messages are not so easy to
> interpret.

It would be nice if there were a standard way of detecting this. As
Michael's example shows, we have a gnutls-available-p function which
is defined if gnutls is not available, but for libxml, we check for
non-definition of functions.

Phil



reply via email to

[Prev in Thread] Current Thread [Next in Thread]