[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: no gnus registry new dependency on ert?
From: |
David Engster |
Subject: |
Re: no gnus registry new dependency on ert? |
Date: |
Wed, 06 Apr 2011 17:03:50 +0200 |
User-agent: |
Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (darwin) |
David Engster writes:
> Ted Zlatanov writes:
>> On Wed, 06 Apr 2011 15:28:07 +0200 David Engster <address@hidden> wrote:
>>
>> DE> It seems like putting (require 'ert) into an eval-when-compile is not
>
>> DE> sufficient. You have to require it unconditionally.
>>
>> DE> So maybe your first idea was The Right Thing To Do, meaning to use
>>
>> DE> (require 'ert nil t)
>>
>> DE> and then test for feature 'ert. Alternatively, you could use the current
>> DE> hack and put this require in there, too. But this is getting
>> DE> increasingly ugly...
>>
>> See the attached patch, which just adds (require 'ert nil t) *in
>> addition* to the defmacro hack. It seems to DTRT for me, let me know
>> what you think.
>
> Yes, that's what I meant with the latter suggestion. I'm not sure if
> this is the right way to solve this, but it works for me, too.
Addendum: Maybe the "real" solution is to have the tests in a separate
file, so that a (require 'registry) won't instantiate the ERT tests. I
can see why having the tests in the file itself can be convenient, but
usually, test-suites are separated from the actual code? Anyway, I don't
really have a strong opinion on this.
-David