* bug#28385: ert "should" macros to not be globally visible
@ 2017-09-07 18:24 Glenn Morris
2019-07-15 11:01 ` Lars Ingebrigtsen
2019-09-29 1:26 ` Stefan Kangas
0 siblings, 2 replies; 4+ messages in thread
From: Glenn Morris @ 2017-09-07 18:24 UTC (permalink / raw)
To: 28385
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#28385: ert "should" macros to not be globally visible
2017-09-07 18:24 bug#28385: ert "should" macros to not be globally visible Glenn Morris
@ 2019-07-15 11:01 ` Lars Ingebrigtsen
2019-09-29 1:26 ` Stefan Kangas
1 sibling, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-15 11:01 UTC (permalink / raw)
To: Glenn Morris; +Cc: 28385
Glenn Morris <rgm@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
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#28385: ert "should" macros to not be globally visible
2017-09-07 18:24 bug#28385: ert "should" macros to not be globally visible Glenn Morris
2019-07-15 11:01 ` Lars Ingebrigtsen
@ 2019-09-29 1:26 ` Stefan Kangas
2020-08-10 16:58 ` Stefan Kangas
1 sibling, 1 reply; 4+ messages in thread
From: Stefan Kangas @ 2019-09-29 1:26 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 28385
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Glenn Morris <rgm@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
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#28385: ert "should" macros to not be globally visible
2019-09-29 1:26 ` Stefan Kangas
@ 2020-08-10 16:58 ` Stefan Kangas
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Kangas @ 2020-08-10 16:58 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: Glenn Morris, 28385
tags 28385 + wontfix notabug
close 28385
thanks
Stefan Kangas <stefan@marxist.se> writes:
> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
>> Glenn Morris <rgm@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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-08-10 16:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-07 18:24 bug#28385: ert "should" macros to not be globally visible Glenn Morris
2019-07-15 11:01 ` Lars Ingebrigtsen
2019-09-29 1:26 ` Stefan Kangas
2020-08-10 16:58 ` Stefan Kangas
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).