From: "Harald Jörg" <haj@posteo.de>
To: 10483@debbugs.gnu.org
Subject: bug#10483: [PATCH] Fix a bogus test introduced by treating (Bug#10483)
Date: Mon, 5 Oct 2020 20:30:22 +0200 [thread overview]
Message-ID: <0db14c37-394c-05bb-5f5a-3f8baa5d59b0@posteo.de> (raw)
In-Reply-To: <CAHZoxq_P5cHGnJuPFR-10WLUbrUKiWOznwXwTjmsqa7jTyLOrA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 605 bytes --]
Severity: minor
The commit 2020-09-04 "Fix infloop when indenting in cperl-mode" for
(Bug#10483) contained a test to make sure that indenting for some edge
cases. This test 'cperl-mode-test-indent-exp' fails unless cperl-mode
is activated for the buffer.
The attached patch activates cperl-mode, and skips the test under
perl-mode, and avoids dependency on how inline comments are indented.
I couldn't just open a new bug without unarchiving the old one, perhaps
because I've included the old bug number. Please tell me if it is
better to treat such follow-ups as entirely new bugs.
--
Cheers,
haj
[-- Attachment #2: 0001-cperl-mode-Fix-a-test-to-ensure-cperl-mode-is-active.patch --]
[-- Type: text/x-patch, Size: 2321 bytes --]
From 03829b2c8fafe0c83a2629afddc98bb7c2bd98aa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Harald=20J=C3=B6rg?= <haj@posteo.de>
Date: Mon, 5 Oct 2020 12:36:56 +0200
Subject: ; cperl-mode: Fix a test to ensure cperl-mode is active
Tweaking my commit 2020-09-04 "Fix infloop when indenting in cperl-mode":
* test/lisp/progmodes/cperl-mode-tests.el
(cperl-mode-test-indent-exp): Make sure that cperl-mode is active
for testing 'cperl-indent-exp', also skip this test under
perl-mode.
* test/lisp/progmodes/cperl-mode-resources/cperl-indent-exp.pl:
Eliminate dependency on unrelated customizable variables.
---
test/lisp/progmodes/cperl-mode-resources/cperl-indent-exp.pl | 4 ++--
test/lisp/progmodes/cperl-mode-tests.el | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/test/lisp/progmodes/cperl-mode-resources/cperl-indent-exp.pl b/test/lisp/progmodes/cperl-mode-resources/cperl-indent-exp.pl
index 4a9842ffa5..8c1883a10f 100644
--- a/test/lisp/progmodes/cperl-mode-resources/cperl-indent-exp.pl
+++ b/test/lisp/progmodes/cperl-mode-resources/cperl-indent-exp.pl
@@ -26,7 +26,7 @@
}
continue
{
-last; # no endless loop, though
+last;
}
}
# -------- while loop: expected output --------
@@ -34,7 +34,7 @@
while (1) {
say "boring loop";
} continue {
- last; # no endless loop, though
+ last;
}
}
# -------- while loop: end --------
diff --git a/test/lisp/progmodes/cperl-mode-tests.el b/test/lisp/progmodes/cperl-mode-tests.el
index f0ff8e9005..20be7ed68c 100644
--- a/test/lisp/progmodes/cperl-mode-tests.el
+++ b/test/lisp/progmodes/cperl-mode-tests.el
@@ -148,6 +148,7 @@ cperl-mode-test-indent-exp
These exercise some standard blocks and also the special
treatment for Perl expressions where a closing paren isn't the
end of the statement."
+ (skip-unless (eq cperl-test-mode #'cperl-mode))
(let ((file (expand-file-name "cperl-indent-exp.pl"
cperl-mode-tests-data-directory)))
(with-temp-buffer
@@ -166,6 +167,7 @@ cperl-mode-test-indent-exp
got)
(with-temp-buffer
(insert code)
+ (cperl-mode)
(goto-char (point-min))
(cperl-indent-exp) ; here we go!
(setq expected (concat "test case " name ":\n" expected))
--
2.20.1
next prev parent reply other threads:[~2020-10-05 18:30 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-12 0:02 bug#10483: 24.0.92; cperl-indent-exp hangs Eric Hanchrow
2020-08-31 17:06 ` bug#10483: [PATCH] cperl-mode: Avoid endless loop Harald Jörg
2020-08-31 17:24 ` Eli Zaretskii
2020-08-31 18:08 ` Harald Jörg
2020-08-31 18:49 ` Eli Zaretskii
2020-08-31 21:23 ` Stefan Kangas
2020-09-01 16:12 ` Harald Jörg
2020-09-04 3:17 ` Lars Ingebrigtsen
2020-09-04 7:15 ` Eli Zaretskii
2020-09-04 10:41 ` Lars Ingebrigtsen
2020-09-04 10:51 ` Andreas Schwab
2020-09-04 10:55 ` Lars Ingebrigtsen
2020-09-04 11:36 ` Eli Zaretskii
2020-09-04 12:00 ` Lars Ingebrigtsen
2020-09-04 12:05 ` Andreas Schwab
2020-09-04 11:34 ` Eli Zaretskii
2020-09-04 11:59 ` Lars Ingebrigtsen
2020-09-04 12:28 ` Eli Zaretskii
2020-09-04 12:36 ` Lars Ingebrigtsen
2020-09-04 12:09 ` Andreas Schwab
2020-10-05 18:30 ` Harald Jörg [this message]
2020-10-06 1:40 ` bug#10483: [PATCH] Fix a bogus test introduced by treating (Bug#10483) Lars Ingebrigtsen
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=0db14c37-394c-05bb-5f5a-3f8baa5d59b0@posteo.de \
--to=haj@posteo.de \
--cc=10483@debbugs.gnu.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.