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, 3 Sep 2020 20:17:53 +0000 [thread overview]
Message-ID: <CADwFkmmvyeWV2soYKec_Y31qXKhwQvZFY=h70wSJxJpF_oJxCw@mail.gmail.com> (raw)
In-Reply-To: <jwvmu26kh8p.fsf-monnier+emacs@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 334 bytes --]
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.
[-- Attachment #2: 0001-test-lisp-progmodes-perl-mode-tests.el-New-file.patch --]
[-- Type: text/x-diff, Size: 1853 bytes --]
From dc8f879c40c124db4211d0b0579672367936019b Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas@gmail.com>
Date: Thu, 3 Sep 2020 21:59:53 +0200
Subject: [PATCH] * test/lisp/progmodes/perl-mode-tests.el: New file.
---
test/lisp/progmodes/perl-mode-tests.el | 33 ++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
create mode 100644 test/lisp/progmodes/perl-mode-tests.el
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 @@
+;;; perl-mode-tests --- Test for perl-mode -*- lexical-binding: t -*-
+
+;; Copyright (C) 2020 Free Software Foundation, Inc.
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
+
+;;; Code:
+
+(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
--
2.28.0
next prev parent reply other threads:[~2020-09-03 20:17 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 [this message]
2020-10-22 13:42 ` Stefan Kangas
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADwFkmmvyeWV2soYKec_Y31qXKhwQvZFY=h70wSJxJpF_oJxCw@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 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.