emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Perl and Emacs: Developing tests for progmodes


From: Stefan Kangas
Subject: Re: Perl and Emacs: Developing tests for progmodes
Date: Thu, 22 Oct 2020 06:42:09 -0700

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 via email to

[Prev in Thread] Current Thread [Next in Thread]