From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian =?utf-8?Q?Reu=C3=9Fe?= Subject: Re: [PATCH 1/2] Add tests for org-refile-get-targets Date: Wed, 17 May 2017 20:43:52 +0200 Message-ID: <87d1b7gw7r.fsf@wirrsal.net> References: <20170515125455.18251-1-seb@wirrsal.net> <87efvqxeha.fsf@nicolasgoaziou.fr> 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]:36671) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dB3vZ-0000MQ-UA for emacs-orgmode@gnu.org; Wed, 17 May 2017 14:44:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dB3vW-0006rH-R6 for emacs-orgmode@gnu.org; Wed, 17 May 2017 14:44:05 -0400 Received: from wirrsal.net ([188.68.36.149]:37660 helo=mail.wirrsal.net) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dB3vW-0006oR-H6 for emacs-orgmode@gnu.org; Wed, 17 May 2017 14:44:02 -0400 In-reply-to: <87efvqxeha.fsf@nicolasgoaziou.fr> 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: Nicolas Goaziou Cc: emacs-orgmode@gnu.org Hello Nicolas, Nicolas Goaziou writes: > Nitpick: Sections in test-org.el are sorted alphabetically. So the new > "Refile" section could go between "Radio Targets" and "Sparse trees". Thank you, I hadn=E2=80=99t noticed. > Would it be possible to split this big test into smaller ones, with > a description about what is really tested? See other tests in > "test-org.el" for some examples. Big tests tend to not being very > informative when they fail. IMO, code duplication is not an issue in > test files when it makes tests more readable/useful. Sure. Have a look at the follow-up patch and let me know what you think. 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? > It would be even better if you can avoid relying on real files ("a.org" > and "b.org" in your patch), but if it makes the test too convoluted, no > worries. In the follow-up, I stuck with this primarily because of the =E2=80=98full-file-path=E2=80=99 test. I figure one could somehow mock a = file-backed buffer, but I expected that would be too involved just to have everything inlined in the test. Let me know if you think differently though. Kind regards, SR --=20 Insane cobra split the wood Trader of the lowland breed Call a jittney, drive away In the slipstream we will stay