[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tests involving post-command-hook
From: |
Stephen Berman |
Subject: |
Re: Tests involving post-command-hook |
Date: |
Wed, 01 Aug 2018 10:47:46 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
On Tue, 31 Jul 2018 19:50:14 -0400 Noam Postavsky <address@hidden> wrote:
> On 31 July 2018 at 18:10, Stephen Berman <address@hidden> wrote:
>
>> Is this behavior of post-command-hook expected and if so, is using
>> run-hooks in ERT valid, i.e. is it still really testing hl-line-mode
>> behavior?
>
> Asking whether it's "really" testing seems in danger of getting
> philosophical, but you might also want to look at ert-simulate-command
> which runs those hooks (it doesn't perfectly simulate everything
> though).
Thanks, this indeed works just like calling run-hooks. I didn't mean to
wax philosophical, just wondering whether running a hook function
explicitly in a test when it isn't automatically run as expected is
legitimate in the test environment, and given the existence of
ert-simulate-command, I conclude the answer is yes. Thanks (once again)
for the pointer.
Steve Berman
- Re: Tests involving post-command-hook,
Stephen Berman <=