GNU bug report logs -
#16854
24.3.50; ert-run-tests-interactively t selector not working
Previous Next
Reported by: Helmut Eller <eller.helmut <at> gmail.com>
Date: Sun, 23 Feb 2014 14:58:02 UTC
Severity: normal
Found in version 24.3.50
Fixed in version 24.4
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 16854 in the body.
You can then email your comments to 16854 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16854
; Package
emacs
.
(Sun, 23 Feb 2014 14:58:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Helmut Eller <eller.helmut <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 23 Feb 2014 14:58:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
When I run this
(require 'ert)
(ert-deftest infloop0 () (while t))
with: emacs -Q -nw -l infloops.el -f ert
Emacs starts up and asks: "Run tests (default t): "
If I enter: "t RET"
then ERT does not run anything and simply writes:
"Ran 0 tests, 0 results were as expected"
The expected result is that all tests should be executed.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16854
; Package
emacs
.
(Sun, 23 Feb 2014 17:22:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 16854 <at> debbugs.gnu.org (full text, mbox):
Helmut Eller <eller.helmut <at> gmail.com> writes:
> When I run this
>
> (require 'ert)
> (ert-deftest infloop0 () (while t))
>
> with: emacs -Q -nw -l infloops.el -f ert
>
> Emacs starts up and asks: "Run tests (default t): "
> If I enter: "t RET"
> then ERT does not run anything and simply writes:
> "Ran 0 tests, 0 results were as expected"
>
> The expected result is that all tests should be executed.
Same here. Apparently, this is fallout from 114803 (bug#9756).
The code before it used `read-from-minibuffer' with t READ argument, so
"t" was converted to `t'. But now `ert-select-tests' receives SELECTOR
as "t".
The patch below fixes it for me.
=== modified file 'lisp/emacs-lisp/ert.el'
--- lisp/emacs-lisp/ert.el 2014-02-04 17:37:08 +0000
+++ lisp/emacs-lisp/ert.el 2014-02-23 17:16:26 +0000
@@ -1882,11 +1882,12 @@
;; defined without cl.
(car ert--selector-history)
"t")))
- (completing-read (if (null default)
- "Run tests: "
- (format "Run tests (default %s): " default))
- obarray #'ert-test-boundp nil nil
- 'ert--selector-history default nil))
+ (intern
+ (completing-read (if (null default)
+ "Run tests: "
+ (format "Run tests (default %s): " default))
+ obarray #'ert-test-boundp nil nil
+ 'ert--selector-history default nil)))
nil))
(unless message-fn (setq message-fn 'message))
(let ((output-buffer-name output-buffer-name)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16854
; Package
emacs
.
(Sun, 23 Feb 2014 18:17:01 GMT)
Full text and
rfc822 format available.
Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):
On Sun, Feb 23 2014, Dmitry Gutov wrote:
> Helmut Eller <eller.helmut <at> gmail.com> writes:
>
>> When I run this
>>
>> (require 'ert)
>> (ert-deftest infloop0 () (while t))
>>
>> with: emacs -Q -nw -l infloops.el -f ert
>>
>> Emacs starts up and asks: "Run tests (default t): "
>> If I enter: "t RET"
>> then ERT does not run anything and simply writes:
>> "Ran 0 tests, 0 results were as expected"
>>
>> The expected result is that all tests should be executed.
>
> Same here. Apparently, this is fallout from 114803 (bug#9756).
>
> The code before it used `read-from-minibuffer' with t READ argument, so
> "t" was converted to `t'. But now `ert-select-tests' receives SELECTOR
> as "t".
>
> The patch below fixes it for me.
Yes, with the patch t works. But it's no longer possible to enter
regexps. Not sure if that matters. Maybe the default should be the
regexp ".*" instead of t. Hmm, that would look odd.
Helmut
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16854
; Package
emacs
.
(Sun, 23 Feb 2014 21:18:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 16854 <at> debbugs.gnu.org (full text, mbox):
Helmut Eller <eller.helmut <at> gmail.com> writes:
> Yes, with the patch t works. But it's no longer possible to enter
> regexps. Not sure if that matters.
It probably does: `ert-select-tests' describes regexps among possible
selector values. Maybe we should only convert "t" to t, and keep other
values intact.
> Maybe the default should be the
> regexp ".*" instead of t. Hmm, that would look odd.
I dunno, looks okay to me. I was thinking of using an empty string as
the default, but it probably wouldn't look good in the "Run tests:"
prompt.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16854
; Package
emacs
.
(Mon, 24 Feb 2014 06:36:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 16854 <at> debbugs.gnu.org (full text, mbox):
On Sun, Feb 23 2014, Dmitry Gutov wrote:
> Helmut Eller <eller.helmut <at> gmail.com> writes:
>
>> Yes, with the patch t works. But it's no longer possible to enter
>> regexps. Not sure if that matters.
>
> It probably does: `ert-select-tests' describes regexps among possible
> selector values. Maybe we should only convert "t" to t, and keep other
> values intact.
I think now that using read instead of intern should work fine: normal
test names can be entered with tab completion support and regexps by
inserting quotes as needed. The only remaining annoyance is that spaces
must be inserted with C-q SPC.
Helmut
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16854
; Package
emacs
.
(Mon, 24 Feb 2014 06:59:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 16854 <at> debbugs.gnu.org (full text, mbox):
Helmut Eller <eller.helmut <at> gmail.com> writes:
> I think now that using read instead of intern should work fine: normal
> test names can be entered with tab completion support and regexps by
> inserting quotes as needed. The only remaining annoyance is that spaces
> must be inserted with C-q SPC.
Quoting regexps in a minibuffer prompt is somewhat unusual, in
particular wrt backslashes.
--
Nico.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16854
; Package
emacs
.
(Mon, 24 Feb 2014 14:01:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 16854 <at> debbugs.gnu.org (full text, mbox):
On Mon, Feb 24 2014, Nicolas Richard wrote:
> Helmut Eller <eller.helmut <at> gmail.com> writes:
>> I think now that using read instead of intern should work fine: normal
>> test names can be entered with tab completion support and regexps by
>> inserting quotes as needed. The only remaining annoyance is that spaces
>> must be inserted with C-q SPC.
>
> Quoting regexps in a minibuffer prompt is somewhat unusual, in
> particular wrt backslashes.
The M-x ert command wants an s-expression as argument and that's not
unusual, e.g. M-: also takes sexps. The syntax is just the same as for
regular Lisp code. What is unusual about M-x ert is that candidates for
symbol completion aren't names of functions but names of tests.
Helmut
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16854
; Package
emacs
.
(Mon, 24 Feb 2014 17:53:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 16854 <at> debbugs.gnu.org (full text, mbox):
On 24.02.2014 08:35, Helmut Eller wrote:
> I think now that using read instead of intern should work fine: normal
> test names can be entered with tab completion support and regexps by
> inserting quotes as needed.
I think so too. At least, that's how it worked before.
`read-from-minibuffer' docstring describes the READ argument to work as
(car (read-from-string INPUT-STRING)), but I don't see how it's better
than plain `read'.
> The only remaining annoyance is that spaces
> must be inserted with C-q SPC.
Yeah, that's a separate problem. Personally, I don't use SPC for
completion anywhere, so that binding is harmful for me in any kind of
completing-read, not just here.
Reply sent
to
Dmitry Gutov <dgutov <at> yandex.ru>
:
You have taken responsibility.
(Wed, 26 Feb 2014 02:06:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Helmut Eller <eller.helmut <at> gmail.com>
:
bug acknowledged by developer.
(Wed, 26 Feb 2014 02:06:02 GMT)
Full text and
rfc822 format available.
Message #31 received at 16854-done <at> debbugs.gnu.org (full text, mbox):
Version: 24.4
On 24.02.2014 16:00, Helmut Eller wrote:
>>> I think now that using read instead of intern should work fine
Installed in revno 116563.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 26 Mar 2014 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 10 years and 55 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.