From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH 1/2] Add tests for org-refile-get-targets Date: Mon, 22 May 2017 02:38:32 +0200 Message-ID: <87pof1hgjb.fsf@nicolasgoaziou.fr> References: <20170515125455.18251-1-seb@wirrsal.net> <87efvqxeha.fsf@nicolasgoaziou.fr> <87d1b7gw7r.fsf@wirrsal.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCbMr-0003IZ-FG for emacs-orgmode@gnu.org; Sun, 21 May 2017 20:38:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dCbMq-0002hN-OP for emacs-orgmode@gnu.org; Sun, 21 May 2017 20:38:37 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:52073) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dCbMq-0002ep-HK for emacs-orgmode@gnu.org; Sun, 21 May 2017 20:38:36 -0400 In-Reply-To: <87d1b7gw7r.fsf@wirrsal.net> ("Sebastian =?utf-8?Q?Reu=C3=9Fe?= =?utf-8?Q?=22's?= message of "Wed, 17 May 2017 20:43:52 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Sebastian =?utf-8?Q?Reu=C3=9Fe?= Cc: emacs-orgmode@gnu.org Hello, Sebastian Reu=C3=9Fe writes: > Sure. Have a look at the follow-up patch and let me know what you > think. Thank you! > It didn=E2=80=99t feel right copy-pasting the tests wholesale, so I made a > helper-macro. I checked the ert output by forcing a failure and the > failure explanation looks as expected. Does this work for you? Honestly, I still find it difficult to follow and debug when one the tests is failing. Also, we can't use `alist-get' since we are still supporting Emacs 24.3. Taking inspiration from your patch, I wrote a test for `refile-get-targets' in f335c3517de06eb74a3c3727843f276147795a84. It has more code duplication than yours. OTOH, it doesn't require any hard-coded file. Hopefully, it will be simpler to debug when a problem arises in the function. Regards, --=20 Nicolas Goaziou