Subject: bug#37127: [PATCH] A final tweak: Skip the test for older Emacsen

From: [email-masked] (Harald Jörg)
Date: Mon, 02 Nov 2020 23:52:56 +0100

The current fix for this bug is in simple.el.  This comes with the side
effect that it will not be available in older Emacs versions when CPerl
mode makes its way to GNU ELPA.

The bug is completely harmless, I guess that porting the fix to older
versions isn't worth the effort.  I suggest to just skip the test when
run under Emacs < 28, though this isn't strictly mandatory in the Emacs
repository.
--
Cheers,
haj
>From 365163de04a42ea9a24a56a8d68781988def8f42 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Harald=20J=C3=B6rg?= <[email-masked]>
Date: Mon, 2 Nov 2020 23:44:58 +0100
Subject: [PATCH] cperl-mode: Skip a test for older Emacsen (preparing for
 ELPA)

* test/lisp/progmodes/cperl-mode-tests.el (cperl-bug37127):
Skip this test for older Emacsen.  The bug has been fixed
in Emacs, but outside of CPerl mode, and therefore will not
be available for older versions via ELPA.
---
 test/lisp/progmodes/cperl-mode-tests.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/test/lisp/progmodes/cperl-mode-tests.el b/test/lisp/progmodes/cperl-mode-tests.el
index 9a7b5e4d6d..dcde3b68a0 100644
--- a/test/lisp/progmodes/cperl-mode-tests.el
+++ b/test/lisp/progmodes/cperl-mode-tests.el
@@ -224,6 +224,10 @@ cperl-bug37127
   "Verify that closing a paren in a regex goes without a message.
 Also check that the message is issued if the regex terminator is
 missing."
+  ;; The actual fix for this bug is in simple.el, which is not
+  ;; backported to older versions of Emacs.  Therefore we skip this
+  ;; test if we're running Emacs 27 or older.
+  (skip-unless (< 27 emacs-major-version))
   ;; Part one: Regex is ok, no messages
   (ert-with-message-capture collected-messages
     (with-temp-buffer
-- 
2.20.1