From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.devel Subject: Re: Tests involving post-command-hook Date: Wed, 01 Aug 2018 10:47:46 +0200 Message-ID: <87y3dq79sd.fsf@gmx.net> References: <87bmangip8.fsf@gmx.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1533113191 1693 195.159.176.226 (1 Aug 2018 08:46:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 1 Aug 2018 08:46:31 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Emacs developers To: Noam Postavsky Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 01 10:46:26 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fkmm1-0000Io-0C for ged-emacs-devel@m.gmane.org; Wed, 01 Aug 2018 10:46:25 +0200 Original-Received: from localhost ([::1]:34074 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fkmo7-0004AU-Lk for ged-emacs-devel@m.gmane.org; Wed, 01 Aug 2018 04:48:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fkmnP-0004AD-OI for emacs-devel@gnu.org; Wed, 01 Aug 2018 04:47:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fkmnN-0003Ya-3L for emacs-devel@gnu.org; Wed, 01 Aug 2018 04:47:51 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:57975) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fkmnM-0003Y6-QB for emacs-devel@gnu.org; Wed, 01 Aug 2018 04:47:49 -0400 Original-Received: from rosalinde ([84.63.9.49]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Ln8Tl-1gRXX53CAP-00hQw0; Wed, 01 Aug 2018 10:47:46 +0200 In-Reply-To: (Noam Postavsky's message of "Tue, 31 Jul 2018 19:50:14 -0400") X-Provags-ID: V03:K1:t12mlFP26zGc90zVuopsYgLOk9YHJ20ZGPEXmDJXiZXHfTwIO2S 6TbNygpVxOg5s8Yk3cKrN6eaC5kGC+TBB+OBqXlCNaGLeO9ytZEL7TLs3MTk6aFYNEkyxVv 10JLSrMUgX9LLMW3whJofSWIcLlwTtMJVvS5+iy0ZPWXAKvnQAFCK4/fVNhCejeQh3JOihL 0LvlZ4X2U3GnLP+2Hu1nA== X-UI-Out-Filterresults: notjunk:1;V01:K0:7ZPVCkuKgFc=:6YwSCaQ2sgYE1k2MGSbnNL n23Zm0U4mQ+SuWQE/sEQEs+MIaXKdrreJp57TD+jcCYTb+HPi9Ip5CmGEljBdTnPordolA6zv uQ7jgCYqJ3Lmh/JWe0K9FZJiLy4+XD4Mw4IsF8BTLrwk4wINOYGh3gmGMrNZVbwjOIYwCp6E3 acs95Bjx2qL8b07qJ9H2z7PPW8V0A9m7n6Xqmr0qRN5so/24XagIb+j5psSk5GyEbw4RPC4Ns hcUZ6NtXKmbja34ptvbd9vn0SyJ1r5ZS4bokJF4RpRWyH7szKwKDUZ1k3IZ5J4Q+ErX/kivom a4HijuqN/+iODYaDqgPMduJV1kgPlvSAVib5hltSj1oo7DZLfyJLV5HtBY5gfk56iFvT35c1r wuhNRvqGWTbDpmkElWdi1JHjvAz6GxnF+o3+4hcG6qoLgaZN+YSVs85FjV5z4T0ghlOyjeoWa DuMRdZ6VjR1d6C4kleFrHEkoRmGG0Kn1nLnZeJjUbOpzRKE2WiE01y9NcwiF64rm32vjiosq+ r+IboAlPHR2gH9x2hhDPEQ5Tf8a/yG0xr7uS1dw/sbfK2kh8HOaBTtIuh3ttv+PC3nE9O0uv4 Mp3MWMUgXVtT9N80MU7uHULEtN3/+cj0Z6HfeEmIFE5DlRQdt/A+gfY57wuomQ5q+dBgOhP+p lUuDd8RGnVoXMsKQ8TIw1rBwbC3/rl5pmGCuwMTlOWlz4Y6q260CAHZrjjHvf3t1RC68ovD3G oaCxHLyE0R12Eo3SMKUDqGPpI/aHktP50EsHuLnNddoNBHLG+3nbJgHXauoi4DWgsB/HIz3s X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.18 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:228077 Archived-At: On Tue, 31 Jul 2018 19:50:14 -0400 Noam Postavsky wrote: > On 31 July 2018 at 18:10, Stephen Berman 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