From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Harald =?UTF-8?Q?J=C3=B6rg?= Newsgroups: gmane.emacs.bugs Subject: bug#10483: [PATCH] Fix a bogus test introduced by treating (Bug#10483) Date: Mon, 5 Oct 2020 20:30:22 +0200 Message-ID: <0db14c37-394c-05bb-5f5a-3f8baa5d59b0@posteo.de> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------E5F09668362654E5A9DD8F30" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32765"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 To: 10483@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 05 20:32:22 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kPVHZ-0008Oz-Mv for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Oct 2020 20:32:21 +0200 Original-Received: from localhost ([::1]:43422 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kPVHX-0001EA-IE for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Oct 2020 14:32:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40076) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPVGI-0000iz-KC for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2020 14:31:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39002) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kPVGI-0005eH-AR for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2020 14:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kPVGI-0000RL-7E for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2020 14:31:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Harald =?UTF-8?Q?J=C3=B6rg?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Oct 2020 18:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10483 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed confirmed X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.1601922642570 (code B ref -1); Mon, 05 Oct 2020 18:31:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Oct 2020 18:30:42 +0000 Original-Received: from localhost ([127.0.0.1]:50548 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPVFy-00008i-7g for submit@debbugs.gnu.org; Mon, 05 Oct 2020 14:30:42 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:59330) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kPVFw-00006v-8U for submit@debbugs.gnu.org; Mon, 05 Oct 2020 14:30:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40004) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPVFw-0000dC-1d for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2020 14:30:40 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:34333) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kPVFk-0005T5-Ck for bug-gnu-emacs@gnu.org; Mon, 05 Oct 2020 14:30:37 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 832582400FD for ; Mon, 5 Oct 2020 20:30:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1601922625; bh=AGtnKUsHLsbj985qQwSxBnqIlsBFNJCRSInXfTt1l0U=; h=From:Subject:To:Autocrypt:Date:From; b=hgSs1eUF9S9ZIGS+8nznMfCbLglCL1BDPZk31cRbKMsxa8GofWxaIHYXx37AtJBHB +Cf0b+gbog/SFuVV+iJ5JBl+aF7WOxV1mQ1KZ42PsxXyfaEOfAh+8H8hCyKy7IffZ+ /vaymAAvRjTCSSDYPEug4tW527MzsWShKOKCzcEXFp3Z614l8ZyR426utFEhp2j7Ud 04b97X0yEAvDg+lduTuIietHawP+nMLp8P2A3BRjnZLBfuFZeQL6kFbZ0nf97wajYy VSv8SGB6BYD+BsFwC1DDH6m8SJ0BL2hDE+tjZnPQPgb7KNWMMre8d3zoMAXNP/pUY/ fZ6oF5r7YBJgQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4C4q0K0SzVz9rxl for ; Mon, 5 Oct 2020 20:30:24 +0200 (CEST) Autocrypt: addr=haj@posteo.de; keydata= mQINBF0DVrIBEAC7TRlIilBg/5Dx7R2rV4FBDEavbyMT2cS2wWyksh7JA8e17LNmTdakf+Bm u6C2m6+frolteYRlkreoyAg0fj/5tDw/s5dJDw3tM0b+m/pj2HcwTSRpQSEy5lBiCg11E6Mt F9UngCfkGtJzu8PBWXc1RDQVBwRn5MZbpMZZatE8NOq9AA3Yg6sY11Ez3xIvYU2R7a4OSxmc RJV2+dhdQ4oOTBIGQ2urQSU81kyRtkx+/Yh8WefMrk9nF3nzYziLS53euCAXyzklwYmD6Li3 XSu7wYp5fISky9DK6DPFK7h4RXEL4GFAhy31ehrVnNTcGRohM1Dm9BV9dwXkwlaeT3q0X+nE SXVqPDHtv748bXNIg2WVCZ0WgShcA46XVlSE9Fm+w0HI/1m1L4BaMmQ7gyK5dEchbhxohkk0 AqC3hEJ4ULRidrsCoCWGMFKiOIb9rjeC00vhrUkVJDkPWEGLXjhnRQykb6cESko0rPrSDLqX 9YqaNQ6KO9Un6uogE7YnXYg35EXJ8ORdX257IbXNbFVpgM8FFsl48WV3Pl9WNdADhnnOrz3O wzyK58i/BTsnjVX8ghbWkQcPQ2Kprt+4YR2trEi7TM5Uqzzrg0vp7Oe/9KZBxdxCE67thV7h ElW3CHb4q6o31b4cFmLbtFesSy+hnUU4UymgHgi/hvhxioBxIQARAQABtBxIYXJhbGQgSsO2 cmcgPGhhakBwb3N0ZW8uZGU+iQJOBBMBCAA4FiEEIpYEZLQynxF8Q17KN4XzzzqAcpsFAl0D VrICGwMFCwkIBwIGFQgJCgsCBBYCAwECHgECF4AACgkQN Content-Language: en-US Received-SPF: pass client-ip=185.67.36.66; envelope-from=haj@posteo.de; helo=mout02.posteo.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/05 09:01:58 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:189843 Archived-At: This is a multi-part message in MIME format. --------------E5F09668362654E5A9DD8F30 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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 --------------E5F09668362654E5A9DD8F30 Content-Type: text/x-patch; charset=UTF-8; name="0001-cperl-mode-Fix-a-test-to-ensure-cperl-mode-is-active.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-cperl-mode-Fix-a-test-to-ensure-cperl-mode-is-active.pa"; filename*1="tch" >From 03829b2c8fafe0c83a2629afddc98bb7c2bd98aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harald=20J=C3=B6rg?= 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 --------------E5F09668362654E5A9DD8F30--