GNU bug report logs -
#28385
ert "should" macros to not be globally visible
Previous Next
Reported by: Glenn Morris <rgm <at> gnu.org>
Date: Thu, 7 Sep 2017 18:25:01 UTC
Severity: wishlist
Tags: notabug, wontfix
Found in version 25.2
Done: Stefan Kangas <stefan <at> marxist.se>
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 28385 in the body.
You can then email your comments to 28385 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#28385
; Package
emacs
.
(Thu, 07 Sep 2017 18:25:01 GMT)
Full text and
rfc822 format available.
Message #3 received at submit <at> debbugs.gnu.org (full text, mbox):
Package: emacs
Version: 25.2
Severity: wishlist
emacs -Q -l ert
Now "should", "should-not", and "should-error" are globally defined as
macros (with no "ert-" prefix). They are only useful inside ert-deftests.
Perhaps they should steal a trick from the similar "skip-unless", which
is not globally visible. The global definition is "ert--skip-unless",
and the ert-deftest macro basically makes "skip-unless" an alias for
this inside the body of a test. This seems cleaner.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28385
; Package
emacs
.
(Mon, 15 Jul 2019 11:02:01 GMT)
Full text and
rfc822 format available.
Message #6 received at 28385 <at> debbugs.gnu.org (full text, mbox):
Glenn Morris <rgm <at> gnu.org> writes:
> Now "should", "should-not", and "should-error" are globally defined as
> macros (with no "ert-" prefix). They are only useful inside ert-deftests.
> Perhaps they should steal a trick from the similar "skip-unless", which
> is not globally visible. The global definition is "ert--skip-unless",
> and the ert-deftest macro basically makes "skip-unless" an alias for
> this inside the body of a test. This seems cleaner.
When writing tests, I find it convenient that I can `C-x C-e'
(should ...)
terms. I mean, I could just `C-x C-e' the insides of the form instead,
but still...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28385
; Package
emacs
.
(Sun, 29 Sep 2019 01:27:02 GMT)
Full text and
rfc822 format available.
Message #9 received at 28385 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> Glenn Morris <rgm <at> gnu.org> writes:
>
>> Now "should", "should-not", and "should-error" are globally defined as
>> macros (with no "ert-" prefix). They are only useful inside ert-deftests.
>> Perhaps they should steal a trick from the similar "skip-unless", which
>> is not globally visible. The global definition is "ert--skip-unless",
>> and the ert-deftest macro basically makes "skip-unless" an alias for
>> this inside the body of a test. This seems cleaner.
>
> When writing tests, I find it convenient that I can `C-x C-e'
>
> (should ...)
>
> terms. I mean, I could just `C-x C-e' the insides of the form instead,
> but still...
I agree; I do this all the time when developing tests. C-x C-e inside
the form doesn't help much e.g. when you have a let form doing some
setup that contains multiple should statements. (See
test/lisp/bookmark-tests.el for an example.)
With all due respect to Glenn, I would suggest to close this as wontfix.
Best regards,
Stefan Kangas
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#28385
; Package
emacs
.
(Mon, 10 Aug 2020 17:00:02 GMT)
Full text and
rfc822 format available.
Message #12 received at 28385 <at> debbugs.gnu.org (full text, mbox):
tags 28385 + wontfix notabug
close 28385
thanks
Stefan Kangas <stefan <at> marxist.se> writes:
> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>
>> Glenn Morris <rgm <at> gnu.org> writes:
>>
>>> Now "should", "should-not", and "should-error" are globally defined as
>>> macros (with no "ert-" prefix). They are only useful inside ert-deftests.
>>> Perhaps they should steal a trick from the similar "skip-unless", which
>>> is not globally visible. The global definition is "ert--skip-unless",
>>> and the ert-deftest macro basically makes "skip-unless" an alias for
>>> this inside the body of a test. This seems cleaner.
>>
>> When writing tests, I find it convenient that I can `C-x C-e'
>>
>> (should ...)
>>
>> terms. I mean, I could just `C-x C-e' the insides of the form instead,
>> but still...
>
> I agree; I do this all the time when developing tests. C-x C-e inside
> the form doesn't help much e.g. when you have a let form doing some
> setup that contains multiple should statements. (See
> test/lisp/bookmark-tests.el for an example.)
>
> With all due respect to Glenn, I would suggest to close this as wontfix.
No further comments within 45 weeks, so I'm closing this now.
Feel free to reopen if you disagree and we can discuss it.
Best regards,
Stefan Kangas
Added tag(s) notabug and wontfix.
Request was from
Stefan Kangas <stefan <at> marxist.se>
to
control <at> debbugs.gnu.org
.
(Mon, 10 Aug 2020 17:00:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
28385 <at> debbugs.gnu.org and Glenn Morris <rgm <at> gnu.org>
Request was from
Stefan Kangas <stefan <at> marxist.se>
to
control <at> debbugs.gnu.org
.
(Mon, 10 Aug 2020 17:00:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 08 Sep 2020 11:24:11 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 73 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.