Subject: bug#72073: closed (Re: bug#72073: [PATCH] Fix wdired-test-unfinished-edit-01 when temp dirname contains "foo")

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 13 Jul 2024 10:39:02 +0000

Your bug report

#72073: [PATCH] Fix wdired-test-unfinished-edit-01 when temp dirname contains "foo"

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
72073: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=72073
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#72073: [PATCH] Fix wdired-test-unfinished-edit-01 when temp dirname contains "foo"
From: Eli Zaretskii <[email-masked]>
To: Peter Oliver <[email-masked]>
Cc: [email-masked]
Date: Sat, 13 Jul 2024 13:38:21 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> Date: Fri, 12 Jul 2024 11:02:24 +0100 (BST)
> From: Peter Oliver <[email-masked]>
> 
> 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).

Thanks, installed on the emacs-30 release branch, and closing the bug.

Subject: [PATCH] Fix wdired-test-unfinished-edit-01 when temp dirname contains "foo"
From: Peter Oliver <[email-masked]>
To: [email-masked]
Date: Fri, 12 Jul 2024 11:02:24 +0100 (BST)
List-Id: <debbugs-submit.debbugs.gnu.org>

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

From 90734f5a3ba9998886e0b03382878a2fb514d015 Mon Sep 17 00:00:00 2001
From: Peter Oliver <[email-masked]>
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