From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#70196: 30.0.50; sh-script-tests fails Date: Thu, 04 Apr 2024 18:46:57 +0300 Message-ID: <864jch6sge.fsf@gnu.org> References: <87plv52qqx.fsf@gmx.de> <86bk6p6x55.fsf@gnu.org> <87le5t19n4.fsf@gmx.de> <878r1t188x.fsf@gmx.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28570"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70196@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 04 17:48:19 2024 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 1rsPK6-0007DU-R0 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Apr 2024 17:48:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rsPJo-00024H-6M; Thu, 04 Apr 2024 11:48:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rsPJm-00023f-AQ for bug-gnu-emacs@gnu.org; Thu, 04 Apr 2024 11:47:58 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rsPJm-0002tc-1k for bug-gnu-emacs@gnu.org; Thu, 04 Apr 2024 11:47:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rsPJq-0008K5-Kl for bug-gnu-emacs@gnu.org; Thu, 04 Apr 2024 11:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Apr 2024 15:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70196 X-GNU-PR-Package: emacs Original-Received: via spool by 70196-submit@debbugs.gnu.org id=B70196.171224563731610 (code B ref 70196); Thu, 04 Apr 2024 15:48:02 +0000 Original-Received: (at 70196) by debbugs.gnu.org; 4 Apr 2024 15:47:17 +0000 Original-Received: from localhost ([127.0.0.1]:34554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rsPJ6-0008Dg-U6 for submit@debbugs.gnu.org; Thu, 04 Apr 2024 11:47:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34938) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rsPJ2-0008CP-4Z for 70196@debbugs.gnu.org; Thu, 04 Apr 2024 11:47:15 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rsPIq-0002nT-Vj; Thu, 04 Apr 2024 11:47:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=XBl83Y6XioQvdYG+etgrtHkKTH3Sy5MOP+/IraPsC/M=; b=SXl11zOYhLCu gJTEJZJL/v10pCz5pzySjM3eIK/CGb8ibkFBM5omkt5kHeGgcfIRSVF0BxTNqhtdIcrIKHvVKJ6Kj WcCX0b3RyO0sMeIrfbdEnsJkeklkMVabxsLp9q3ySxqZc/lpxp4W1OfUsEjx59RHSeomFiQI1ANuc 7q4o0kwpKFCzgWpMjkqdrDltMlk/dQuDyVf3DVBHgIbrwMhuxIFW1H+MEfg59oMcGmRopa+E0lvA8 fAOCZbm2k9UqFezeD3r5CCC2Jc8cMwCHwBh47+02h7lRuABM+RAj4nIa+t9xXS5qS0JgmBUv/90S9 Nz+ntdkCYWlbKFuLqW1LOw==; In-Reply-To: <878r1t188x.fsf@gmx.de> (message from Michael Albinus on Thu, 04 Apr 2024 17:02:22 +0200) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:282669 Archived-At: > From: Michael Albinus > Cc: 70196@debbugs.gnu.org > Date: Thu, 04 Apr 2024 17:02:22 +0200 > > The following works for me w/o problems: > > --8<---------------cut here---------------start------------->8--- > # bash -ic "make -C test sh-script-tests" > --8<---------------cut here---------------end--------------->8--- > > And the following shows the errors: > > --8<---------------cut here---------------start------------->8--- > # tcsh -ic "make -C test sh-script-tests" > --8<---------------cut here---------------end--------------->8--- > > So I guess one must check the used shell, when starting the tests. Thanks, does the below fix the problem? diff --git a/test/lisp/progmodes/sh-script-tests.el b/test/lisp/progmodes/sh-script-tests.el index e73d523..3f810e8 100644 --- a/test/lisp/progmodes/sh-script-tests.el +++ b/test/lisp/progmodes/sh-script-tests.el @@ -25,11 +25,15 @@ (require 'ert) (require 'ert-x) +(defun sh-script-tests-shell-script-mode () + (sh-set-shell "/bin/sh") + (shell-script-mode)) + (ert-deftest test-sh-script-indentation () (with-temp-buffer (insert "relative-path/to/configure --prefix=$prefix\\ --with-x") - (shell-script-mode) + (sh-script-tests-shell-script-mode) (goto-char (point-min)) (forward-line 1) (indent-for-tab-command) @@ -41,7 +45,7 @@ test-sh-script-indentation (ert-deftest test-basic-sh-indentation () (with-temp-buffer (insert "myecho () {\necho foo\n}\n") - (shell-script-mode) + (sh-script-tests-shell-script-mode) (indent-region (point-min) (point-max)) (should (equal (buffer-string) "myecho () { @@ -55,7 +59,7 @@ test-indentation (ert-deftest test-indent-after-continuation () (with-temp-buffer (insert "for f \\\nin a; do \\\ntoto; \\\ndone\n") - (shell-script-mode) + (sh-script-tests-shell-script-mode) (let ((sh-indent-for-continuation '++)) (let ((sh-indent-after-continuation t)) (indent-region (point-min) (point-max)) @@ -72,7 +76,7 @@ test-indent-after-continuation (defun test-sh-back (string &optional pos) (with-temp-buffer - (shell-script-mode) + (sh-script-tests-shell-script-mode) (insert string) (sh-smie--default-backward-token) (= (point) (or pos 1)))) @@ -90,7 +94,7 @@ test-backward-token (ert-deftest sh-script-test-do-fontification () "Test that \"do\" gets fontified correctly, even with no \";\"." (with-temp-buffer - (shell-script-mode) + (sh-script-tests-shell-script-mode) (insert "for i do echo 1; done") (font-lock-ensure) (goto-char (point-min))