[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#34419: 27.0.50; [PATCH] Use lexical-binding in conf-mode.el
From: |
Eli Zaretskii |
Subject: |
bug#34419: 27.0.50; [PATCH] Use lexical-binding in conf-mode.el |
Date: |
Fri, 15 Feb 2019 10:46:59 +0200 |
> From: Alex Branham <alex.branham@gmail.com>
> Cc: 34419@debbugs.gnu.org
> Date: Mon, 11 Feb 2019 16:26:57 -0600
>
> > Can you tell how did you test the result to make sure no bugs will be
> > introduced by lexical-binding in this package? I see no test suite
> > for it.
>
> Mostly manual testing. conf-mode isn't that complicated; it's mostly
> dealing with font locking. There are a lot of examples in the docstring
> though so I've attached a patch that adds some tests based on those. The
> tests pass for me both before lexical binding and after.
Thanks for adding the tests. One of them fails for me, see the
diagnostics below.
> I don't need to modify the tests/Makefile.in file to have these run,
> right?
Right.
> >> (conf-align-assignments):
> >> (conf-quote-normal):
> >> (conf-mode-initialize): Fix documentation
> >
> > There's no file name in this log message, and it is under-filled (did
> > you use change-log-mode?). Also, our style is to say "Doc fix" or
> > "Docstring fix" in these cases. Finally, please mention the bug
> > number in the log message.
>
> The file name is in the summary line. Is that not allowed? I was basing
> it off of ac1e5a5e2ed7c6cf5bec50e5ebf7fab6792230bd which looks similar.
Bad example, IMO. the problem is that we use the Git log to generate
ChangeLog when we prepare a release tarball, and these deviations make
malformed ChangeLog entries.
> Either way, the attached patch should be OK I think.
Thanks. As a further nit, please mention the bug number in the log
message when you know it (as you usually do when posting a second
version of the patches). Otherwise I need to add that manually with
"git commit --amend".
Here's the diagnostics from the failed test; can you spot the problem?
Test conf-test-align-assignments backtrace:
signal(ert-test-failed (((should (equal (buffer-string) "foo:
ert-fail(((should (equal (buffer-string) "foo: ba
(if (unwind-protect (setq value-2 (apply fn-0 args-1)) (setq form-de
(let (form-description-4) (if (unwind-protect (setq value-2 (apply f
(let ((value-2 'ert-form-evaluation-aborted-3)) (let (form-descripti
(let* ((fn-0 #'equal) (args-1 (condition-case err (let ((signal-hook
(progn (insert "foo: bar\nbar: baz") (conf-colon-mode) (conf-align-a
(unwind-protect (progn (insert "foo: bar\nbar: baz") (conf-colon-mod
(save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn
(let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-b
(closure (t) nil (let ((temp-buffer (generate-new-buffer " *temp*"))
ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
ert-run-test(#s(ert-test :name conf-test-align-assignments :document
ert-run-or-rerun-test(#s(ert--stats :selector (not (tag :unstable))
ert-run-tests((not (tag :unstable)) #f(compiled-function (event-type
ert-run-tests-batch((not (tag :unstable)))
ert-run-tests-batch-and-exit((not (tag :unstable)))
eval((ert-run-tests-batch-and-exit '(not (tag :unstable))))
command-line-1((#("-L" 0 2 (charset cp862)) #(";." 0 2 (charset cp86
command-line()
normal-top-level()
Test conf-test-align-assignments condition:
(ert-test-failed
((should
(equal
(buffer-string)
"foo: bar
bar: baz"))
:form
(equal "foo: bar
bar: baz" "foo: bar
bar: baz")
:value nil :explanation
(arrays-of-different-length 21 55 "foo: bar
bar: baz" "foo: bar
bar: baz" first-mismatch-at 4)))
FAILED 1/10 conf-test-align-assignments (0.000000 sec)
- bug#34419: 27.0.50; [PATCH] Use lexical-binding in conf-mode.el, Alex Branham, 2019/02/10
- bug#34419: 27.0.50; [PATCH] Use lexical-binding in conf-mode.el, Eli Zaretskii, 2019/02/11
- bug#34419: 27.0.50; [PATCH] Use lexical-binding in conf-mode.el, Alex Branham, 2019/02/11
- bug#34419: 27.0.50; [PATCH] Use lexical-binding in conf-mode.el,
Eli Zaretskii <=
- bug#34419: 27.0.50; [PATCH] Use lexical-binding in conf-mode.el, Alex Branham, 2019/02/15
- bug#34419: 27.0.50; [PATCH] Use lexical-binding in conf-mode.el, Eli Zaretskii, 2019/02/15
- bug#34419: 27.0.50; [PATCH] Use lexical-binding in conf-mode.el, Alex Branham, 2019/02/18
- bug#34419: 27.0.50; [PATCH] Use lexical-binding in conf-mode.el, Eli Zaretskii, 2019/02/18
- bug#34419: 27.0.50; [PATCH] Use lexical-binding in conf-mode.el, Alex Branham, 2019/02/19