all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Peter Oliver <p.d.oliver@mavit.org.uk>
To: 72073@debbugs.gnu.org
Subject: bug#72073: [PATCH] Fix wdired-test-unfinished-edit-01 when temp dirname contains "foo"
Date: Fri, 12 Jul 2024 11:02:24 +0100 (BST)	[thread overview]
Message-ID: <3676f6be-86d2-db49-0564-08b6888201a1@mavit.org.uk> (raw)

[-- Attachment #1: Type: text/plain, Size: 216 bytes --]

The attached patch fixes an intermittent test failure, when the randomly-generated directory name used in the test happens to contain the substring “foo” (which is something the test looks for).

-- 
Peter Oliver

[-- Attachment #2: Type: text/plain, Size: 1159 bytes --]

From 90734f5a3ba9998886e0b03382878a2fb514d015 Mon Sep 17 00:00:00 2001
From: Peter Oliver <git@mavit.org.uk>
Date: Fri, 12 Jul 2024 10:52:23 +0100
Subject: [PATCH] Fix wdired-test-unfinished-edit-01 when temp dirname contains
 "foo"

* test/lisp/wdired-tests.el (wdired-test-unfinished-edit-01): Don't
modify the random directory name if, by chance, it happens to contain
the substring "foo".
---
 test/lisp/wdired-tests.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/lisp/wdired-tests.el b/test/lisp/wdired-tests.el
index f7bff743058..f6d2194e998 100644
--- a/test/lisp/wdired-tests.el
+++ b/test/lisp/wdired-tests.el
@@ -114,7 +114,7 @@ wdired-test-unfinished-edit-01
     (setq test-dir (file-truename test-dir))
     (let* ((test-file (concat (file-name-as-directory test-dir) "foo.c"))
            (replace "bar")
-           (new-file (string-replace "foo" replace test-file)))
+           (new-file (string-replace "/foo" (concat "/" replace) test-file)))
       (write-region "" nil test-file nil 'silent)
       (let ((buf (find-file-noselect test-dir)))
         (unwind-protect
-- 
2.45.2


             reply	other threads:[~2024-07-12 10:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-12 10:02 Peter Oliver [this message]
2024-07-13 10:38 ` bug#72073: [PATCH] Fix wdired-test-unfinished-edit-01 when temp dirname contains "foo" Eli Zaretskii

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=3676f6be-86d2-db49-0564-08b6888201a1@mavit.org.uk \
    --to=p.d.oliver@mavit.org.uk \
    --cc=72073@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.