[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] master 75336a2: Merge branch 'feature/standard-test-lo

From: Phillip Lord
Subject: Re: [Emacs-diffs] master 75336a2: Merge branch 'feature/standard-test-location'
Date: Sat, 28 Nov 2015 21:20:09 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Dmitry Gutov <address@hidden> 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

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]