emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master f87ace2: ; Continued attempt to fix Bug#36940


From: Michael Albinus
Subject: [Emacs-diffs] master f87ace2: ; Continued attempt to fix Bug#36940
Date: Mon, 26 Aug 2019 10:14:28 -0400 (EDT)

branch: master
commit f87ace2aed492d5d605da59b59af6fad5f0e33e4
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    ; Continued attempt to fix Bug#36940
    
    * test/lisp/net/tramp-tests.el (tramp--test-file-attributes-equal-p):
    Handle link number.
    (tramp--test-check-files): Encode search string on macOS.  (Bug#36940)
---
 test/lisp/net/tramp-tests.el | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 557536a..9930a2c 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -3098,6 +3098,12 @@ They might differ only in time attributes or directory 
size."
   (let ((attr1 (copy-sequence attr1))
        (attr2 (copy-sequence attr2))
        (start-time (- tramp--test-start-time 10)))
+    ;; Link number.  For directories, it includes the number of
+    ;; subdirectories.  Set it to 1.
+    (when (eq (tramp-compat-file-attribute-type attr1) t)
+      (setcar (nthcdr 1 attr1) 1))
+    (when (eq (tramp-compat-file-attribute-type attr2) t)
+      (setcar (nthcdr 1 attr2) 1))
     ;; Access time.
     (setcar (nthcdr 4 attr1) tramp-time-dont-know)
     (setcar (nthcdr 4 attr2) tramp-time-dont-know)
@@ -5285,10 +5291,15 @@ This requires restrictions of file name syntax."
                    (goto-char (point-min))
                    (should
                     (re-search-forward
-                     (format
-                      "^%s=%s$"
-                      (regexp-quote envvar)
-                      (regexp-quote (getenv envvar))))))))))
+                      ;; We must use proper encoding on macOS.  See
+                      ;; Bug#36940.
+                      (funcall
+                      (if (eq coding-system-for-read 'utf-8-hfs)
+                           'ucs-normalize-HFS-NFD-string 'identity)
+                      (format
+                       "^%s=%s$"
+                       (regexp-quote envvar)
+                       (regexp-quote (getenv envvar)))))))))))
 
        ;; Cleanup.
        (ignore-errors (delete-directory tmp-name1 'recursive))



reply via email to

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