unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Tino Calancha <tino.calancha@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: tino.calancha@gmail.com, emacs-devel@gnu.org
Subject: Re: dired-tests.el fails on MS-Windows
Date: Wed, 02 Aug 2017 02:02:32 +0900	[thread overview]
Message-ID: <87d18fw79z.fsf@calancha-pc> (raw)
In-Reply-To: <83zibjz519.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 01 Aug 2017 18:22:42 +0300")

Eli Zaretskii <eliz@gnu.org> 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	other threads:[~2017-08-01 17:02 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-01 15:22 dired-tests.el fails on MS-Windows Eli Zaretskii
2017-08-01 17:02 ` Tino Calancha [this message]
2017-08-01 19:04   ` Eli Zaretskii
2017-08-01 20:56     ` Fabrice Popineau
2017-08-02  6:44       ` Tino Calancha
2017-08-04 13:18         ` Eli Zaretskii
2017-08-04 13:30           ` Fabrice Popineau
2017-08-04 13:44             ` Tino Calancha
2017-08-04 14:01               ` Fabrice Popineau
2017-08-04 14:00             ` Eli Zaretskii
2017-08-04  5:21     ` Tino Calancha
2017-08-04 13:14       ` Eli Zaretskii
2017-08-04 13:39         ` Tino Calancha
2017-08-04 14:23         ` Fabrice Popineau
2017-08-04 14:39           ` Fabrice Popineau
2017-08-04 14:49             ` Tino Calancha
2017-08-04 14:58               ` Fabrice Popineau
2017-08-04 15:10                 ` Tino Calancha
2017-08-01 20:52 ` Fabrice Popineau
2017-08-02  3:38   ` Tino Calancha
2017-08-02  6:31     ` Michael Albinus
2017-08-02  7:59       ` Tino Calancha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d18fw79z.fsf@calancha-pc \
    --to=tino.calancha@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).