(should (file-notify-valid-p watch))
(file-notify-rm-watch watch))))
+(ert-deftest files-file-name-non-special-dired-compress-handler ()
+ ;; `dired-compress-file' can get confused by filenames with ":" in
+ ;; them, which causes this to fail on `windows-nt' systems. This
+ ;; test does seem to pass on GNU/Linux systems, but it's not clear
+ ;; why since the "/:" quoted file names also have ":" in them. Just
+ ;; skip for now.
+ (ert-skip "FIXME: dired-compress-file unreliable for names containing `:'." )
+ (files-tests--with-temp-file tmpfile
+ (let* ((nospecial (concat "/:" tmpfile))
+ (compressed (dired-compress-file nospecial)))
+ (when compressed
+ (should (equal nospecial (dired-compress-file compressed)))))))
+
(ert-deftest files-file-name-non-special-handlers ()
(files-tests--with-temp-file tmpfile
(files-tests--with-temp-dir tmpdir
(directory-files tmpdir)))
(should (equal (directory-files-and-attributes nospecial-dir)
(directory-files-and-attributes tmpdir)))
- (dired-compress-file (dired-compress-file nospecial))
(dired-uncache nospecial-dir)
(should (equal (expand-file-name nospecial)
nospecial))
(find-backup-file-name tmpfile))))
(should-not (get-file-buffer nospecial))
(should (equal (with-temp-buffer
- (insert-directory nospecial-dir nil)
+ (insert-directory nospecial-dir "")
(buffer-string))
(with-temp-buffer
- (insert-directory tmpdir nil)
+ (insert-directory tmpdir "")
(buffer-string))))
(with-temp-buffer
(insert-file-contents nospecial)
(should (search-forward emacs-version nil t))
(kill-process proc)
(accept-process-output proc ))))
- (let ((process-environment (cons "FOO=foo" process-environment)))
+ (let ((process-environment (cons "FOO=foo" process-environment))
+ (nospecial-foo (concat nospecial "$FOO")))
;; The "/:" prevents substitution.
- (equal (substitute-in-file-name nospecial) nospecial))
+ (equal (substitute-in-file-name nospecial-foo) nospecial-foo))
(let ((default-directory nospecial-dir))
(equal (temporary-file-directory) temporary-file-directory))
(equal (unhandled-file-name-directory nospecial-dir)