unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefankangas@gmail.com>
To: "Stefan Monnier" <monnier@iro.umontreal.ca>,
	"Harald Jörg" <haj@posteo.de>
Cc: emacs-devel@gnu.org
Subject: Re: Perl and Emacs: Developing tests for progmodes
Date: Thu, 22 Oct 2020 06:42:09 -0700	[thread overview]
Message-ID: <CADwFkmngKHV5coHeYwXWE9FKE=ZUjX+tZxV=LT=_kScSrN+G3Q@mail.gmail.com> (raw)
In-Reply-To: <CADwFkmmvyeWV2soYKec_Y31qXKhwQvZFY=h70wSJxJpF_oJxCw@mail.gmail.com>

Stefan Kangas <stefankangas@gmail.com> writes:

> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>> I think for now we can tag the tests individually with
>>
>>     (ert-deftest (...)
>>       (skip-unless (eq cperl-test-mode #'cperl-mode))
>>       ...)
>
> How about something like the attached to make the tests run
> automatically also for perl-mode?  It's a bit of a hack, admittedly.

This never got a reply.  Is the idea reasonable, or should it just be
scrapped?  I personally don't have a strong opinion, but I didn't want to
throw it away without at least asking first.

(It is sometimes hard for me to understand if no reply means "sure, go
ahead" or "this is too dumb to even comment on"...  ;-)

Of course, it will introduce some potential friction in developing new
cperl-mode tests, but on the other hand perl-mode.el will see some
automated testing.

> diff --git a/test/lisp/progmodes/perl-mode-tests.el b/test/lisp/progmodes/perl-mode-tests.el
> new file mode 100644
> index 0000000000..a2ea972c10
> --- /dev/null
> +++ b/test/lisp/progmodes/perl-mode-tests.el
> @@ -0,0 +1,33 @@
[...]
> +(require 'perl-mode)
> +
> +;;;; Re-use cperl-mode tests
> +
> +(defvar cperl-test-mode)
> +(setq cperl-test-mode #'perl-mode)
> +(load-file (expand-file-name "cperl-mode-tests.el"
> +                             (file-truename
> +                              (file-name-directory (or load-file-name
> +                                                       buffer-file-name)))))
> +
> +;;; perl-mode-tests.el ends here



  reply	other threads:[~2020-10-22 13:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-03 13:42 Perl and Emacs: Developing tests for progmodes Harald Jörg
2020-09-03 15:52 ` Stefan Monnier
2020-09-03 20:17   ` Stefan Kangas
2020-10-22 13:42     ` Stefan Kangas [this message]
2020-10-22 15:28       ` Stefan Monnier
2020-10-22 16:32         ` Stefan Kangas
2020-10-22 16:30       ` Harald Jörg
2020-10-22 19:38         ` Stefan Kangas
2020-09-03 17:34 ` Eli Zaretskii
2020-09-03 20:00   ` Harald Jörg
2020-09-04  6:55     ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADwFkmngKHV5coHeYwXWE9FKE=ZUjX+tZxV=LT=_kScSrN+G3Q@mail.gmail.com' \
    --to=stefankangas@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=haj@posteo.de \
    --cc=monnier@iro.umontreal.ca \
    /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 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).