From unknown Mon Jun 23 07:47:16 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#25534 <25534@debbugs.gnu.org> To: bug#25534 <25534@debbugs.gnu.org> Subject: Status: 26.0; xref ERT tests fail when the source path is mixed case Reply-To: bug#25534 <25534@debbugs.gnu.org> Date: Mon, 23 Jun 2025 14:47:16 +0000 retitle 25534 26.0; xref ERT tests fail when the source path is mixed case reassign 25534 emacs submitter 25534 Wilfred Hughes severity 25534 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 25 16:59:56 2017 Received: (at submit) by debbugs.gnu.org; 25 Jan 2017 21:59:56 +0000 Received: from localhost ([127.0.0.1]:43827 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWVbf-00074v-St for submit@debbugs.gnu.org; Wed, 25 Jan 2017 16:59:56 -0500 Received: from eggs.gnu.org ([208.118.235.92]:42975) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWVbe-00074f-Bw for submit@debbugs.gnu.org; Wed, 25 Jan 2017 16:59:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cWVbU-0005Fb-QS for submit@debbugs.gnu.org; Wed, 25 Jan 2017 16:59:49 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,HTML_MESSAGE, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:58256) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cWVbU-0005FX-MY for submit@debbugs.gnu.org; Wed, 25 Jan 2017 16:59:44 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33921) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cWVbP-0001Lw-Lo for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2017 16:59:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cWVbM-0005A4-Jq for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2017 16:59:39 -0500 Received: from mail-qt0-x236.google.com ([2607:f8b0:400d:c0d::236]:35355) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cWVbM-000595-Eh for bug-gnu-emacs@gnu.org; Wed, 25 Jan 2017 16:59:36 -0500 Received: by mail-qt0-x236.google.com with SMTP id x49so41752371qtc.2 for ; Wed, 25 Jan 2017 13:59:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wilfred-me-uk.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=CmYLY44iwotOrWzyRs4ff64vLN0poTzC0nwm3JgIEDU=; b=LV11KcJ1njLLXii13uDYDQRqhwaFFvoy8blKydx2qcMYUJDISmbzp7ULysFGhAWa1l 0/U55LftQ2Z0px+wMPzfyXBV1AhtmwVQbfenucQLScIKyuU3zwMPp7nmjkfRnxtrKar6 FOHP+SdtD740xQCuxIr0vj1NEM7+SSqbZL7WOi9SwNkjyO/5pSsQDx3xtqbPxXfiAXN3 DeP6PBZCp1InIXUphb23Wl98kptLDGrALrXrkIlzBrpw+ASydeVgf3ZHMnIVKrJ5usyj h+pjJIFZaFv1qyPTHDSKRoIgClKYokkan/vE5MPTzjGRNGhkyh7J8AnTmPNkaRMk7ePP NYRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=CmYLY44iwotOrWzyRs4ff64vLN0poTzC0nwm3JgIEDU=; b=Ol8bQ4JAMwTGqAc88cSUqW4AfYbf6dQGefzCfNK+ydnyGJ0BNz+KbTF+yywYJTU3TQ dqweLmRau6Jr5UnS3CrzXPsSTq6k2vX0ARRlL95/g+utcKwvVSlISt6603w/CkusYwgp xOFlb9fyPc/OIK/GUVNKs2NJWLGwaafQE3mQtBPAvouwnvZToemGraBj553b3LUn6lU/ xzSsclSorHZa7HwxUO/Aw4z1KGGNM73SJhKcUeM+5Fss5fhJIYniZOsLRCr9C92J2NCb 4rM7K+Bxx2khUgwGXNM0VJeCvXQPxDQEnzwhuGPgnv2qoWTGvCPVuKUySUWieG0/rK+z tTZQ== X-Gm-Message-State: AIkVDXKLiIKw67U4BAWeY3YBHfTVETF3OQAegpZfM9fEXA6O1dumXdn1U3NZVu81sfY/fM1coR+jVrvNLnIdnw== X-Received: by 10.237.36.129 with SMTP id t1mr36531544qtc.202.1485381573956; Wed, 25 Jan 2017 13:59:33 -0800 (PST) MIME-Version: 1.0 Received: by 10.237.36.239 with HTTP; Wed, 25 Jan 2017 13:59:13 -0800 (PST) X-Originating-IP: [77.103.217.201] From: Wilfred Hughes Date: Wed, 25 Jan 2017 21:59:13 +0000 Message-ID: Subject: 26.0; xref ERT tests fail when the source path is mixed case To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=001a114060721279310546f2599b X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --001a114060721279310546f2599b Content-Type: text/plain; charset=UTF-8 The xref tests fail on case sensitive filesystems if the source directory is not all lower case. For example, if I have Emacs checked out in /home/wilfred/src/EMACS, I get the following test failure: Test xref-elisp-test-find-defs-defalias-defun-el condition: (error "Can't find library /home/wilfred/src/emacs/lisp/buff-menu.el") FAILED 12/36 xref-elisp-test-find-defs-defalias-defun-el Note that the path is incorrectly converted from ~/src/EMACS to ~/src/emacs, which doesn't exist. This causes the following tests to fail: FAILED xref-elisp-test-find-defs-constructor FAILED xref-elisp-test-find-defs-defalias-defun-el FAILED xref-elisp-test-find-defs-defgeneric-co-located-default FAILED xref-elisp-test-find-defs-defgeneric-el FAILED xref-elisp-test-find-defs-defgeneric-implicit-generic FAILED xref-elisp-test-find-defs-defgeneric-no-default FAILED xref-elisp-test-find-defs-defgeneric-no-methods FAILED xref-elisp-test-find-defs-defgeneric-separate-default FAILED xref-elisp-test-find-defs-define-overload-co-located-default FAILED xref-elisp-test-find-defs-define-overload-no-default FAILED xref-elisp-test-find-defs-define-overload-no-methods FAILED xref-elisp-test-find-defs-define-overload-separate-default FAILED xref-elisp-test-find-defs-defun-defvar-el FAILED xref-elisp-test-find-defs-defun-el FAILED xref-elisp-test-find-defs-defun-el-defvar-c FAILED xref-elisp-test-find-defs-defvar-el FAILED xref-elisp-test-find-defs-face-el FAILED xref-elisp-test-find-defs-feature-el --001a114060721279310546f2599b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
The xref tests fail on case sensitive filesystems if the s= ource directory is not all lower case.

For example, if I have Emacs = checked out in /home/wilfred/src/EMACS, I get the following test failure:
Test xref-elisp-test-find-defs-defalias-defun-el condition:
=C2=A0= =C2=A0 (error "Can't find library /home/wilfred/src/emacs/lisp/bu= ff-menu.el")
=C2=A0 =C2=A0FAILED =C2=A012/36 =C2=A0xref-elisp-test-= find-defs-defalias-defun-el

Note that the path is incorrectly conver= ted from ~/src/EMACS to ~/src/emacs, which doesn't exist.

This c= auses the following tests to fail:

=C2=A0 =C2=A0FAILED =C2=A0xref-el= isp-test-find-defs-constructor
=C2=A0 =C2=A0FAILED =C2=A0xref-elisp-test= -find-defs-defalias-defun-el
=C2=A0 =C2=A0FAILED =C2=A0xref-elisp-test-f= ind-defs-defgeneric-co-located-default
=C2=A0 =C2=A0FAILED =C2=A0xref-el= isp-test-find-defs-defgeneric-el
=C2=A0 =C2=A0FAILED =C2=A0xref-elisp-te= st-find-defs-defgeneric-implicit-generic
=C2=A0 =C2=A0FAILED =C2=A0xref-= elisp-test-find-defs-defgeneric-no-default
=C2=A0 =C2=A0FAILED =C2=A0xre= f-elisp-test-find-defs-defgeneric-no-methods
=C2=A0 =C2=A0FAILED =C2=A0x= ref-elisp-test-find-defs-defgeneric-separate-default
=C2=A0 =C2=A0FAILED= =C2=A0xref-elisp-test-find-defs-define-overload-co-located-default
=C2= =A0 =C2=A0FAILED =C2=A0xref-elisp-test-find-defs-define-overload-no-default=
=C2=A0 =C2=A0FAILED =C2=A0xref-elisp-test-find-defs-define-overload-no-= methods
=C2=A0 =C2=A0FAILED =C2=A0xref-elisp-test-find-defs-define-overl= oad-separate-default
=C2=A0 =C2=A0FAILED =C2=A0xref-elisp-test-find-defs= -defun-defvar-el
=C2=A0 =C2=A0FAILED =C2=A0xref-elisp-test-find-defs-def= un-el
=C2=A0 =C2=A0FAILED =C2=A0xref-elisp-test-find-defs-defun-el-defva= r-c
=C2=A0 =C2=A0FAILED =C2=A0xref-elisp-test-find-defs-defvar-el
=C2= =A0 =C2=A0FAILED =C2=A0xref-elisp-test-find-defs-face-el
=C2=A0 =C2=A0FA= ILED =C2=A0xref-elisp-test-find-defs-feature-el
--001a114060721279310546f2599b-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 30 17:43:32 2017 Received: (at 25534) by debbugs.gnu.org; 30 Jan 2017 22:43:32 +0000 Received: from localhost ([127.0.0.1]:51464 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cYKfc-0005fK-FW for submit@debbugs.gnu.org; Mon, 30 Jan 2017 17:43:32 -0500 Received: from eggs.gnu.org ([208.118.235.92]:60817) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cYKfa-0005f8-86 for 25534@debbugs.gnu.org; Mon, 30 Jan 2017 17:43:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cYKfT-000626-A1 for 25534@debbugs.gnu.org; Mon, 30 Jan 2017 17:43:25 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37276) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYKfQ-00061k-MD; Mon, 30 Jan 2017 17:43:20 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1cYKfQ-0006t2-9D; Mon, 30 Jan 2017 17:43:20 -0500 From: Glenn Morris To: Wilfred Hughes Subject: Re: bug#25534: 26.0; xref ERT tests fail when the source path is mixed case References: X-Spook: Rand Corporation ISEC IMF Delays Power outage FEMA BATF X-Ran: y'&X^Xmyj'YCk=nY4;0W&l'"ih)c2@4K-qL:;nIZE,B'/aM"\!mg&xU-mKAJw'4f%6%q1! X-Hue: white X-Attribution: GM Date: Mon, 30 Jan 2017 17:43:20 -0500 In-Reply-To: (Wilfred Hughes's message of "Wed, 25 Jan 2017 21:59:13 +0000") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -8.2 (--------) X-Debbugs-Envelope-To: 25534 Cc: 25534@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -8.2 (--------) Wilfred Hughes wrote: > The xref tests fail on case sensitive filesystems if the source directory > is not all lower case. I guess this is due to the explicit downcasing added for the huge-and-still-open bug #21816. From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 30 16:39:35 2017 Received: (at control) by debbugs.gnu.org; 30 Jul 2017 20:39:35 +0000 Received: from localhost ([127.0.0.1]:34567 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dbuzu-0006ar-Rd for submit@debbugs.gnu.org; Sun, 30 Jul 2017 16:39:34 -0400 Received: from mail-it0-f50.google.com ([209.85.214.50]:35115) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dbuzt-0006ac-T5; Sun, 30 Jul 2017 16:39:34 -0400 Received: by mail-it0-f50.google.com with SMTP id h199so116882306ith.0; Sun, 30 Jul 2017 13:39:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=FFa13b266YGLuwPKvYH+/NkGYMY0/4P1r7J3ipM0sew=; b=R+IlArcCyIz4NNZlHzicsYsqlqqNGmFldFpvHL/r0BZTvFYXdIrXi0ctu7QGaAUzMQ AN1bSFN5Wp5gVIB1ti/w/zTG9EO8bbHanwG625emHP60Fn/BFLiEj6U4AQgb4GseaiYq CuLae3i3MgmtuGm/l33+0+JzhC29AJC6VFjKKE34jpEw3jyj1N8ypoD94f1GMcuvIlI6 jz1R4iEohbr84iW0cTwtqTBaDRchpZ1/61kZa4W4xl2jD2CzAOPw+HIXBqlNHRaATLop QmFkRLhuPsdN098VsCUPKmAiHPY4dArZ0PNq8yyW7i88FEbxi/yM1Sd9K/O8FwlOBGm4 P81A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=FFa13b266YGLuwPKvYH+/NkGYMY0/4P1r7J3ipM0sew=; b=keU4IJ4YZKICwseq+9dkHTGhX0cv8Hm4+pkSxaeK1yI37jeqYl+5U78lqt6BuUy+bt UCA2aq4yzYH5HleJS4E/jpucaNQyVXiWs49SxV8YU5HKoUWnP30ufJiNZQjZE17ZcILz 2qLFNCvXbhvAJz6Id97jA5rQO0hPaKJ0FHZE+Z/Y/fxR1i8gh86AX6JFZRm4DWa4UCDF 02XUvBYuJrc4t8G7YLa7V9LsO8FcyPwNWNeBn82WFvQvENYgC6HiOQtzRUUWRHgjsZEu IRWO4DXjEmbfxbY5ptw8xoKWaV3aAAkAs207nvuRIA2gYjpkZAGj/Moq+00Hp9NvjFqx wzJg== X-Gm-Message-State: AIVw112TSqJIf7Coyd3QNzQZY+wbiY6L+S5eYsWs717TqNUeHAQPDM2x ZL3mKLcf11JaTlvX X-Received: by 10.36.48.198 with SMTP id q189mr16154750itq.61.1501447167922; Sun, 30 Jul 2017 13:39:27 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id p65sm4708022itb.33.2017.07.30.13.39.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 30 Jul 2017 13:39:27 -0700 (PDT) From: npostavs@users.sourceforge.net To: Rob Browning Subject: Re: bug#27880: 25.2; elisp-mode-tests may downcase too aggressively References: <87fudd6gkr.fsf@trouble.defaultvalue.org> Date: Sun, 30 Jul 2017 16:41:08 -0400 In-Reply-To: <87fudd6gkr.fsf@trouble.defaultvalue.org> (Rob Browning's message of "Sun, 30 Jul 2017 11:21:40 -0500") Message-ID: <87zibl7j4r.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control Cc: 27880@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) merge 27880 25534 quit Rob Browning writes: > [Refiling as a bug report from a list thread.] > > It looks like (in 25.2, and perhaps master too) elisp-mode-tests.el > downcases the xref path (location) for comparison in > xref-elisp-test-run, but that seems to also affect the filesystem lookup > lower down (in xref--goto-location) such that a handful of tests fail if > the build path contains uppercase characters. i.e. it tries to read the > downcased path, which of course (on ext4) doesn't exist. > > In any case, I've hacked up a temporary fix by keeping the original as > "real-xref" and cloning that (and copying the location) to produce the > xref used by the modification and comparison. > > Thanks This is the same as Bug#25534 "xref ERT tests fail when the source path is mixed case", right? From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 18 21:21:46 2018 Received: (at 25534-done) by debbugs.gnu.org; 19 Dec 2018 02:21:46 +0000 Received: from localhost ([127.0.0.1]:53915 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gZRUW-0000P1-LE for submit@debbugs.gnu.org; Tue, 18 Dec 2018 21:21:46 -0500 Received: from eggs.gnu.org ([208.118.235.92]:39096) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gZRUU-0000Oi-Uv for 25534-done@debbugs.gnu.org; Tue, 18 Dec 2018 21:21:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZRUN-0002mg-P6 for 25534-done@debbugs.gnu.org; Tue, 18 Dec 2018 21:21:37 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52656) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZRUN-0002mI-Ev for 25534-done@debbugs.gnu.org; Tue, 18 Dec 2018 21:21:35 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1gZRUL-000378-Gl; Tue, 18 Dec 2018 21:21:33 -0500 From: Glenn Morris To: 25534-done@debbugs.gnu.org Subject: Re: bug#25534: 26.0; xref ERT tests fail when the source path is mixed case References: X-Spook: Exposure Aldergrove Vaccine basement 2600 Stuck X-Ran: .^(cnpn]vsi#z;;B0IIpD%"9y8RC (Glenn Morris's message of "Mon, 30 Jan 2017 17:43:20 -0500") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 25534-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) Version: 26.2 In an effort to reduce the number of distropatches in Debian, specifically https://sources.debian.org/patches/emacs/1:26.1+1-1/0008-Don-t-downcase-real-xref-in-elisp-mode-tests.patch/ I have applied the following: commit 4c6c327 Date: Tue Dec 18 21:18:31 2018 -0500 Restrict downcasing in elisp xref tests (bug#25534) The tests happen to not fail at the moment because find-library-name now has an extra feature, find-library--from-load-history, which happens to do a case-insensitive regexp match; but still it seems better not to rely on this. * test/lisp/progmodes/elisp-mode-tests.el (xref--case-insensitive): New variable. (xref-elisp-test-run, emacs-test-dir): Only downcase if the filesystem seems to be case-insensitive. diff --git a/test/lisp/progmodes/elisp-mode-tests.el b/test/lisp/progmodes/elisp-mode-tests.el index 941e85b..97148ef 100644 --- a/test/lisp/progmodes/elisp-mode-tests.el +++ b/test/lisp/progmodes/elisp-mode-tests.el @@ -298,6 +298,16 @@ xref-elisp-test-descr-to-target ))) +;; tmp may be on a different filesystem to the tests, but, ehh. +(defvar xref--case-insensitive + (let ((dir (make-temp-file "xref-test" t))) + (unwind-protect + (progn + (with-temp-file (expand-file-name "hElLo" dir) "hello") + (file-exists-p (expand-file-name "HELLO" dir))) + (delete-directory dir t))) + "Non-nil if file system seems to be case-insensitive.") + (defun xref-elisp-test-run (xrefs expected-xrefs) (should (= (length xrefs) (length expected-xrefs))) (while xrefs @@ -307,11 +317,13 @@ xref-elisp-test-run (expected-source (when (consp expected) (cdr expected)))) ;; Downcase the filenames for case-insensitive file systems. - (setf (xref-elisp-location-file (oref xref location)) - (downcase (xref-elisp-location-file (oref xref location)))) + (when xref--case-insensitive + (setf (xref-elisp-location-file (oref xref location)) + (downcase (xref-elisp-location-file (oref xref location)))) - (setf (xref-elisp-location-file (oref expected-xref location)) - (downcase (xref-elisp-location-file (oref expected-xref location)))) + (setf (xref-elisp-location-file (oref expected-xref location)) + (downcase (xref-elisp-location-file + (oref expected-xref location))))) (should (equal xref expected-xref)) @@ -346,10 +358,10 @@ xref-elisp-deftest ;; `load-path' has the correct case, so this causes the expected test ;; values to have the wrong case). This is handled in ;; `xref-elisp-test-run'. -(defconst emacs-test-dir - (downcase - (file-truename (file-name-directory - (or load-file-name (buffer-file-name)))))) +(defvar emacs-test-dir + (funcall (if xref--case-insensitive 'downcase 'identity) + (file-truename (file-name-directory + (or load-file-name (buffer-file-name)))))) ;; alphabetical by test name From unknown Mon Jun 23 07:47:16 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 16 Jan 2019 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator