[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: moving some indentation tests
From: |
Noam Postavsky |
Subject: |
Re: moving some indentation tests |
Date: |
Mon, 3 Apr 2017 09:20:01 -0400 |
On Mon, Apr 3, 2017 at 7:11 AM, Phillip Lord <address@hidden> wrote:
>>
>> 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?
In (ert-deftest indent-sexp ()...) in
test/lisp/emacs-lisp/lisp-mode-tests.el where it says ";; Correctly
remove indentation". It's fairly simplistic, I just add an increasing
number of leading spaces to every line except for blank ones and lines
containing "noindent" (that's to avoid string literals). Oh, current
master is missing the check for blanks lines though, that's still
pending on my local branch:
(unless (looking-at "noindent\\|^[[:blank:]]*$")
(insert (make-string n ?\s)))
>
> (assess-roundtrip-indentation=
> 'emacs-lisp-mode
> "
> (assess-with-find-file
> \"~/.emacs\"
> (buffer-string))")
>
> returns "t" for me.
I meant multi-line string literals in the code being indented. I might
be misreading, but I think
(assess-roundtrip-indentation=
'emacs-lisp-mode "\
\"a
\s\s\s\s\smulti
\s\sline
string-literal
\s\s\swith random leading space\"")
would return nil.
- moving some indentation tests, Tom Tromey, 2017/04/02
- Re: moving some indentation tests, Michael Albinus, 2017/04/02
- Re: moving some indentation tests, Eli Zaretskii, 2017/04/02
- Re: moving some indentation tests, Dmitry Gutov, 2017/04/02
- Re: moving some indentation tests, Phillip Lord, 2017/04/02
- Re: moving some indentation tests, Noam Postavsky, 2017/04/02
- Re: moving some indentation tests, Phillip Lord, 2017/04/03
- Re: moving some indentation tests,
Noam Postavsky <=
- Re: moving some indentation tests, Phillip Lord, 2017/04/03
- Re: moving some indentation tests, Noam Postavsky, 2017/04/03
- Re: moving some indentation tests, Phillip Lord, 2017/04/07
- Re: moving some indentation tests, Noam Postavsky, 2017/04/07
Re: moving some indentation tests, Tom Tromey, 2017/04/05