]> git.eshelyaron.com Git - emacs.git/commitdiff
* test/lisp/wdired-tests.el (wdired-test-bug34915): Fix for MS-Windows.
authorEli Zaretskii <eliz@gnu.org>
Sat, 13 Jul 2024 12:06:43 +0000 (15:06 +0300)
committerEshel Yaron <me@eshelyaron.com>
Sat, 13 Jul 2024 20:07:38 +0000 (22:07 +0200)
(cherry picked from commit febafe37884823d5ac6a63a57c7500f4a0a8a792)

test/lisp/wdired-tests.el

index f6d2194e998026d53956d3a2e43aa35a1bcaef1d..7c7026354b8a63b6afee00aba338cd6ec9eafc61 100644 (file)
@@ -141,21 +141,27 @@ wdired-get-filename before and after editing."
   ;; FIXME: Add a test for a door (indicator ">") only under Solaris?
   (ert-with-temp-directory test-dir
     (let* ((dired-listing-switches "-Fl")
-           (dired-ls-F-marks-symlinks (eq system-type 'darwin))
+           (dired-ls-F-marks-symlinks
+            (or (eq system-type 'darwin)
+                (featurep 'ls-lisp)))
            (buf (find-file-noselect test-dir))
            proc)
       (unwind-protect
           (progn
             (with-current-buffer buf
-              (dired-create-empty-file "foo")
-              (set-file-modes "foo" (file-modes-symbolic-to-number "+x"))
+              ;; Create a .bat file so that MS-Windows, where the 'x'
+              ;; bit is not recorded in the filesystem, considers it an
+              ;; executable.
+              (dired-create-empty-file "foo.bat")
+              (set-file-modes "foo.bat" (file-modes-symbolic-to-number "+x"))
               (skip-unless
                ;; This check is for wdired, not symbolic links, so skip
                ;; it when make-symbolic-link fails for any reason (like
                ;; insufficient privileges).
-               (ignore-errors (make-symbolic-link "foo" "bar") t))
+               (ignore-errors (make-symbolic-link "foo.bat" "bar") t))
               (make-directory "foodir")
-              (dired-smart-shell-command "mkfifo foopipe")
+              (unless (memq system-type '(windows-nt ms-dos))
+                (dired-smart-shell-command "mkfifo foopipe"))
               (when (featurep 'make-network-process '(:family local))
                 (setq proc (make-network-process
                             :name "foo"