From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: phillip.lord@russet.org.uk (Phillip Lord) Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 75336a2: Merge branch 'feature/standard-test-location' Date: Sat, 28 Nov 2015 21:20:09 +0000 Message-ID: <874mg5lt2u.fsf@russet.org.uk> References: <20151126211432.7647.1395@vcs.savannah.gnu.org> <5659F8CC.2070106@yandex.ru> <87d1uukk29.fsf@russet.org.uk> <565A0931.8010502@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1448745628 18951 80.91.229.3 (28 Nov 2015 21:20:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 28 Nov 2015 21:20:28 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 28 22:20:16 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a2mum-0002kV-1V for ged-emacs-devel@m.gmane.org; Sat, 28 Nov 2015 22:20:16 +0100 Original-Received: from localhost ([::1]:33834 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2mup-0002cD-GZ for ged-emacs-devel@m.gmane.org; Sat, 28 Nov 2015 16:20:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45789) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2mum-0002c8-Hh for emacs-devel@gnu.org; Sat, 28 Nov 2015 16:20:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a2muh-0006SM-KB for emacs-devel@gnu.org; Sat, 28 Nov 2015 16:20:16 -0500 Original-Received: from cheviot22.ncl.ac.uk ([128.240.234.22]:60368) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2muh-0006SE-Dr for emacs-devel@gnu.org; Sat, 28 Nov 2015 16:20:11 -0500 Original-Received: from smtpauth-vm.ncl.ac.uk ([10.8.233.129] helo=smtpauth.ncl.ac.uk) by cheviot22.ncl.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1a2mug-0003tR-Dt; Sat, 28 Nov 2015 21:20:10 +0000 Original-Received: from cpc6-benw10-2-0-cust45.gate.cable.virginm.net ([92.238.179.46] helo=localhost) by smtpauth.ncl.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1a2mug-00011u-3X; Sat, 28 Nov 2015 21:20:10 +0000 In-Reply-To: <565A0931.8010502@yandex.ru> (Dmitry Gutov's message of "Sat, 28 Nov 2015 22:06:09 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 128.240.234.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:195491 Archived-At: Dmitry Gutov writes: > On 11/28/2015 09:20 PM, Phillip Lord wrote: > >> Possibly not. I just inverted the logic -- I moved all of the files from >> "automated" into top-level, and everything from top-level into "manual". > > All right, thanks, I can see the idea now. I haven't noticed that there's no > 'automatic' directory now. In my experience, pulling from master leaves the "automatic" directory there, although it's gone from git. I'd expected it to delete when the equivalent was removed from git, but apparently not. >> In the long term it might be nice to either link these into "make check" >> from the test dir, > > And then, the 'manual' directory will disappear? Sounds good. Well, there is a place for manual test material. ERT is good for doing unit tests, but some integration tests are likely to remain. But if a test is automatable, then I see no reason it should not run. >> or make them ert driven and move them to the main >> directory. > > In the previous discussions, Stefan has been a been proponent to keeping > indentation tests as sample files, instead of ERT scripts. > > Because, as the argument went, it's much easier to work on the indentation > code when the file contents are right before your eyes, and you can interact > with them live. I'd agree with this entirely, but this doesn't contradict the idea the idea of using ERT. I mean, ERT can read from a file right? It was for this purpose that I had the idea of "-resource" directories in the file location specification. > Initially, I've put a number of indentation tests into > automated/ruby-mode-tests.el, but now I more or less agree with the above > position. If we need an indent test location, then I think this would be good to support, but it would be nice to have a standard naming scheme. I'd like to add support to the make file so that tests (or the .log file) depend on the file that they are testing. At the moment, if you edit (for example) lisp/calc/calc.el, and then run make check, the calc-tests.el file does not get run. This makes no sense to me. The same should be true with indentation tests. >> I've been working on a new package with some higher-level >> predicates which should do most of what the indent tests do, which >> should help. > > There is a `ruby-should-indent-buffer' helper in the aforementioned > file. I haven't really needed much else. My package lets you do something like... (ert-deftest indent (should (sisyphus-indentation= 'emacs-lisp-mode "emacs-lisp-indented.el" "emacs-lisp-unindented.el"))) If it fails, then it runs diff on the results. I hadn't thought of the idea of unindenting first -- I shall add that. It's got a "with-temp-buffers" macro also (for when you need several at once), and "with-preserved-buffer-list". Anyway, that package is early days yet. We shall see if it become useful as it develops. Phil