emacs-devel
[Top][All Lists]
Advanced

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

Re: dired-tests.el fails on MS-Windows


From: Tino Calancha
Subject: Re: dired-tests.el fails on MS-Windows
Date: Wed, 02 Aug 2017 02:02:32 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

> The failed tests are shown below.  2 others failed originally, but I
> fixed them.
>
> Tino, please always add comments to the tests explaining the idea
> behind all the tricks and juggling.  Otherwise, it is very hard to
> understand why the test is doing what it's doing and how it is doing
> that.  Same request for ediff-ptch-tests.el, which also fails for me.
OK.  I agree they looks not very digestive tests.

> dired-tests.log:
>   Test dired-test-bug25609 condition:
>       (ert-test-failed
>        ((should
>        (file-exists-p target))
>       :form
>       (file-exists-p 
> "c:/DOCUME~1/Zaretzky/LOCALS~1/Temp/bar6828Ler/foo6828WPJ")
>       :value nil))
Could you check the following?
emacs -Q
;; eval following form:
(require 'nadvice)
(let* ((from (make-temp-file "foo" 'dir))
       (to (make-temp-file "bar" 'dir))
       (target (expand-file-name (file-name-nondirectory from) to))
       (nested (expand-file-name (file-name-nondirectory from) target))
       (dired-dwim-target t)
       (dired-recursive-copies 'always) ; Don't prompt me.
       buffers)
  (advice-add 'dired-query ; Don't ask confirmation to overwrite a file.
              :override
              (lambda (_sym _prompt &rest _args) (setq dired-query t))
              '((name . "advice-dired-query")))
  (advice-add 'completing-read ; Just return init.
              :override
              (lambda (_prompt _coll &optional _pred _match init _hist _def 
_inherit _keymap)
                init)
              '((name . "advice-completing-read")))
  (push (dired to) buffers)
  (push (dired-other-window temporary-file-directory) buffers)
  (dired-goto-file from)
  (dired-do-copy)
  (dired-do-copy); Again.
  (unwind-protect
      (progn
        (list (file-exists-p target) (file-exists-p nested)))
    (dolist (buf buffers)
      (when (buffer-live-p buf) (kill-buffer buf)))
    (delete-directory from 'recursive)
    (delete-directory to 'recursive)
    (advice-remove 'dired-query "advice-dired-query")
    (advice-remove 'completing-read "advice-completing-read")))
;; The normal result is: '(t nil).  If you get '(nil t) means
;; the bug is not fixed in your platform.  Other values must be
;; wrong assumptions from my side that are not true in your box.


>   Test dired-test-bug27631 backtrace:
>     signal(error ("em-ls is not a currently loaded feature"))
>     error("%s is not a currently loaded feature" "em-ls")
>     unload-feature(em-ls force)
>     (unwind-protect (progn (make-directory dir1) (make-directory dir2) (
>     (let* ((dir (make-temp-file "bug27631" 'dir)) (dir1 (expand-file-nam
>     (closure (t) nil (let* ((dir (make-temp-file "bug27631" 'dir)) (dir1
>     ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
>     ert-run-test(#s(ert-test :name dired-test-bug27631 :documentation "T
>     ert-run-or-rerun-test(#s(ert--stats :selector t :tests [#s(ert-test 
>     ert-run-tests(t #f(compiled-function (event-type &rest event-args) #
>     ert-run-tests-batch(nil)
>     ert-run-tests-batch-and-exit(nil)
>     eval((ert-run-tests-batch-and-exit nil))
>     command-line-1(("-L" ";." "-l" "ert" "-l" "lisp/dired-tests.el" "--e
>     command-line()
>     normal-top-level()
>   Test dired-test-bug27631 condition:
>       (error "em-ls is not a currently loaded feature")
I don't get this error, but the idea of require
those libs and unload them looks ugly.
We could move those parts to:
test/lisp/ls-lisp.el (yes i called wrongly: must be ls-lisp-tests.el)
test/lisp/eshell/eshell-tests.el
and then, we don't need to unload anything.

> ediff-ptch-tests.log:
>
>   Running 2 tests (2017-08-01 18:21:40+0300)
>      passed  1/2  ediff-ptch-test-bug25010
>   Test ediff-ptch-test-bug26084 backtrace:
>   Test ediff-ptch-test-bug26084 condition:
>       (wrong-type-argument stringp nil)
>      FAILED  2/2  ediff-ptch-test-bug26084
I think this test for Bug#26084 is more complicated than the
fix of the bug itself.  It has also problems because the different
idiosyncrasy respect to "-b" option for different versions of "patch".
Delete it?
Skipped it unless in a GNU system?



reply via email to

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