emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-26 ab8ed41: Avoid test failures if directory name lo


From: Glenn Morris
Subject: [Emacs-diffs] emacs-26 ab8ed41: Avoid test failures if directory name looks like a regexp
Date: Tue, 18 Dec 2018 15:34:11 -0500 (EST)

branch: emacs-26
commit ab8ed418596da550c79913ccc42e8c3842bca315
Author: Rob Browning <address@hidden>
Commit: Glenn Morris <address@hidden>

    Avoid test failures if directory name looks like a regexp
    
    Taken from <https://sources.debian.org/patches/emacs/1:26.1+1-1>
    * test/lisp/ibuffer-tests.el (ibuffer-filter-inclusion-3):
    * test/lisp/net/tramp-tests.el (tramp-test42-remote-load-path):
    Regexp-quote file names to avoid failures with directory names
    of the form "build/emacs-i87jK3/emacs-26.1+1/...".
---
 test/lisp/ibuffer-tests.el   | 4 ++--
 test/lisp/net/tramp-tests.el | 5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/test/lisp/ibuffer-tests.el b/test/lisp/ibuffer-tests.el
index ff5162f..c1d9ed9 100644
--- a/test/lisp/ibuffer-tests.el
+++ b/test/lisp/ibuffer-tests.el
@@ -312,8 +312,8 @@
                 (funcall create-non-file-buffer "ibuf-test-3.b" :size 50
                          :mode #'text-mode
                          :include-content "...but a multitude of drops?\n"))
-               (dirA (with-current-buffer bufA default-directory))
-               (dirB (with-current-buffer bufB default-directory)))
+               (dirA (regexp-quote (with-current-buffer bufA 
default-directory)))
+               (dirB (regexp-quote (with-current-buffer bufB 
default-directory))))
           (should (ibuffer-included-in-filters-p
                    bufA '((basename . "ibuf-test-3"))))
           (should (ibuffer-included-in-filters-p
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 8f81081..19edec2 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -4773,8 +4773,9 @@ process sentinels.  They shall not disturb each other."
      (string-match
       (format
        "Loading %s"
-       (expand-file-name
-       "tramp-cmds" (file-name-directory (locate-library "tramp"))))
+       (regexp-quote
+        (expand-file-name
+         "tramp-cmds" (file-name-directory (locate-library "tramp")))))
       (shell-command-to-string
        (format
        "%s -batch -Q -L %s -l tramp-sh --eval %s"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]