From: Stefan Kangas <stefan@marxist.se>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 28385@debbugs.gnu.org
Subject: bug#28385: ert "should" macros to not be globally visible
Date: Sun, 29 Sep 2019 03:26:17 +0200 [thread overview]
Message-ID: <CADwFkmmAM97=X8-mtsxVUzT+ZNfU3e1YUYZMyaYVVtVXkVbWVQ@mail.gmail.com> (raw)
In-Reply-To: <dxzia6v03h.fsf@fencepost.gnu.org>
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
next prev parent reply other threads:[~2019-09-29 1:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2020-08-10 16:58 ` Stefan Kangas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADwFkmmAM97=X8-mtsxVUzT+ZNfU3e1YUYZMyaYVVtVXkVbWVQ@mail.gmail.com' \
--to=stefan@marxist.se \
--cc=28385@debbugs.gnu.org \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.