emacs-devel
[Top][All Lists]
Advanced

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

Re: moving some indentation tests


From: Phillip Lord
Subject: Re: moving some indentation tests
Date: Mon, 03 Apr 2017 12:11:38 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Noam Postavsky <address@hidden> writes:

> On Sun, Apr 2, 2017 at 4:31 PM, Phillip Lord <address@hidden> wrote:
>>
>> My own package, assess, provides good support for this kind of
>> functionality. In particular, you can do this:
>>
>>
>> (assess-roundtrip-indentation=
>>  'emacs-lisp-mode
>>  "
>> (assess-with-find-file
>>     \"~/.emacs\"
>>   (buffer-string))")
>
> For indent-sexp tests I just wrote this sort of thing in line (see
> test/lisp/emacs-lisp/lisp-mode-tests.el). Would have been handy to
> have some pre-written functions for it. After a quick glance I think
> there are two issues that would get in the way of using the code
> currently in assess for those tests though (ignoring the non-Emacs
> deps).
>
> I found that adding indentation and then reindenting turned up some
> different bugs than removing indentation and reindenting. It looks
> like assess only does the latter right now.

Indeed it does. Do you have an example of the former? I am not sure
exactly the test proceedure that you are thinking of but I'd be happy to
add this. I think this kind of thing is why having pre-rolled
functions is good; getting this right is worth the effort.


> Also, AFAICT, it doesn't preserve indentation inside multi-line string
> literals.

It should do. This example:

(assess-roundtrip-indentation=
  'emacs-lisp-mode
"
(assess-with-find-file
    \"~/.emacs\"
  (buffer-string))")

returns "t" for me.

Phil



reply via email to

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