From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Fabrice Popineau Newsgroups: gmane.emacs.devel Subject: Re: dired-tests.el fails on MS-Windows Date: Fri, 4 Aug 2017 15:30:49 +0200 Message-ID: References: <83zibjz519.fsf@gnu.org> <87d18fw79z.fsf@calancha-pc> <83pocfyurp.fsf@gnu.org> <83y3qzwjx9.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c06f45c8d98790555ed829d" X-Trace: blaine.gmane.org 1501859279 26353 195.159.176.226 (4 Aug 2017 15:07:59 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 4 Aug 2017 15:07:59 +0000 (UTC) Cc: Emacs developers , Tino Calancha To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 04 17:07:55 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddeCg-0006bN-Jj for ged-emacs-devel@m.gmane.org; Fri, 04 Aug 2017 17:07:54 +0200 Original-Received: from localhost ([::1]:42740 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddeCj-00071A-Fj for ged-emacs-devel@m.gmane.org; Fri, 04 Aug 2017 11:07:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51140) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ddcjl-0003mS-ID for emacs-devel@gnu.org; Fri, 04 Aug 2017 09:35:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ddciC-00083q-Lg for emacs-devel@gnu.org; Fri, 04 Aug 2017 09:33:57 -0400 Original-Received: from mail-qk0-x236.google.com ([2607:f8b0:400d:c09::236]:36968) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ddch6-0006b4-9W; Fri, 04 Aug 2017 09:31:12 -0400 Original-Received: by mail-qk0-x236.google.com with SMTP id z18so8798178qka.4; Fri, 04 Aug 2017 06:31:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=kCMVBFFi6TUlsbzitcQRJbL9KgRprM6gLivOMOqJkus=; b=XvXELcWyxu1NWLX6AqwaO77sDXKyCtnZ0TvYjKWzG68tqInjwWt9Mz0lXhcFce682z UUlFyA6wzEraCKI+54XWdhHbkxyby18YbMdkZhH4FLM+tev2ubneR/wU/ByHKH9SOULu YAshb/uiiPIhU9M03zYsOiGIMc3ZoeJwJw8s0wdpsIoEuuM2cVGAkfUl7DZZs8QlIfNu BowovvPZNX8y7jrCPsL40lNj4CLvuHtnr/HXD6SpijlQ6Bg6EgNj71rd5YdwLOYdY/Rf 28YGQC+kX9YhtZ29DaveBxX5L9Su4C7U0pXe7bNF2qkH0bh8s2Zo3cRUp5tG3Q1tmHd2 oZdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=kCMVBFFi6TUlsbzitcQRJbL9KgRprM6gLivOMOqJkus=; b=Q7zhdUylNjA488uOy+PCHRi3mdwk0HBbl1LCpsKkmxXcdbLgzIEt6Hx14TVA8gXRDr GmpDf9jL1NTuvzk72G0zBx1MvBm/HTO570Z74EZ06NPUOajao+Zu9ZL4jtBS2BgZ5Ugs Y8LR7Rm99o04bk31rQP6qA0CWVdkuIiduWDHeEccx+yEu8QUFaZEIwL8YsnZX8FYzTao 1PabELrdyK2XY2RYNy9XaTuEjIBNIvUzhQxF2zJv9v7+Lo+vaKkqrgNBLo+LJKhU8FWX FlAPVPSo4+mBdr3YtxT4tW/YW5sTjp9ySjLX5zSSwM2zIf5aGVzljfKoY7YgtRj/IWCz Ud+A== X-Gm-Message-State: AHYfb5g6+nK/m4+ExF8GGbwURBEkyFvzTKBjMNqlrr1OmLbDfyExqklk xMjLTSlYEwNwMvHwR3l9HB0oC0jAd+wp X-Received: by 10.55.169.134 with SMTP id s128mr2912262qke.69.1501853469479; Fri, 04 Aug 2017 06:31:09 -0700 (PDT) Original-Received: by 10.140.82.21 with HTTP; Fri, 4 Aug 2017 06:30:49 -0700 (PDT) In-Reply-To: <83y3qzwjx9.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::236 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:217291 Archived-At: --94eb2c06f45c8d98790555ed829d Content-Type: text/plain; charset="UTF-8" I shall say : it almost passes on my side. I had to apply the following : diff --git a/test/lisp/dired-tests.el b/test/lisp/dired-tests.el index 02dbf263b9..88cdbef6ac 100644 --- a/test/lisp/dired-tests.el +++ b/test/lisp/dired-tests.el @@ -282,7 +282,7 @@ dired-dwim-target (make-directory dir2) (with-temp-file (expand-file-name "a.txt" dir1)) (with-temp-file (expand-file-name "b.txt" dir2)) - (setq buf (dired (expand-file-name "dir*/*.txt" dir))) + (setq buf (dired (cons dir (file-expand-wildcards "dir*/*.txt")))) (dired-toggle-marks) (should (cdr (dired-get-marked-files)))) (delete-directory dir 'recursive) diff --git a/test/lisp/eshell/em-ls-tests.el b/test/lisp/eshell/em-ls-tests.el index 71a555d1ea..cc0e68c47d 100644 --- a/test/lisp/eshell/em-ls-tests.el +++ b/test/lisp/eshell/em-ls-tests.el @@ -42,7 +42,7 @@ (make-directory dir2) (with-temp-file (expand-file-name "a.txt" dir1)) (with-temp-file (expand-file-name "b.txt" dir2)) - (setq buf (dired (expand-file-name "dir*/*.txt" dir))) + (setq buf (dired (cons dir (file-expand-wildcards "dir*/*.txt")))) (dired-toggle-marks) (should (cdr (dired-get-marked-files)))) (customize-set-variable 'eshell-ls-use-in-dired orig) diff --git a/test/lisp/ls-lisp-tests.el b/test/lisp/ls-lisp-tests.el index d24b30e5f2..77a02c88dd 100644 --- a/test/lisp/ls-lisp-tests.el +++ b/test/lisp/ls-lisp-tests.el @@ -69,7 +69,7 @@ (make-directory dir2) (with-temp-file (expand-file-name "a.txt" dir1)) (with-temp-file (expand-file-name "b.txt" dir2)) - (setq buf (dired (expand-file-name "dir*/*.txt" dir))) + (setq buf (dired (cons dir (file-expand-wildcards "dir*/*.txt")))) (dired-toggle-marks) (should (cdr (dired-get-marked-files)))) (delete-directory dir 'recursive) Am I wrong thinking that `expand-file-name' is not supposed to expand "dir*/*.txt"? Fabrice 2017-08-04 15:18 GMT+02:00 Eli Zaretskii : > > From: Tino Calancha > > Date: Wed, 2 Aug 2017 15:44:59 +0900 (JST) > > cc: Eli Zaretskii , Tino Calancha >, > > Emacs developers > > > > > 2017-08-01 21:04 GMT+02:00 Eli Zaretskii : > > > > > > Only if there's no better way. The Patch invocation definitely > needs > > > the --binary switch on Windows, though. But the failure above > is not > > > about that, it's about something else, because directory-files > returns > > > an empty list. Something prevents Patch from creating backup > files. > > > > > > > > > When I add the '--binary' option to patch, the test passes. > > > Again, windows 10, mingw64. > > Fabrice, Eli > > does the following work in your environments? > > Yes, it passes now. > > Thanks! > --94eb2c06f45c8d98790555ed829d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I shall say : it almost passes on my side.

<= div>I had to apply the following :

diff --git= a/test/lisp/dired-tests.el b/test/lisp/dired-tests.el
index 02db= f263b9..88cdbef6ac 100644
--- a/test/lisp/dired-tests.el
+++ b/test/lisp/dired-tests.el
@@ -282,7 +282,7 @@ dired-dwim-t= arget
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(make-directory di= r2)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(with-temp-file (exp= and-file-name "a.txt" dir1))
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(with-temp-file (expand-file-name "b.txt" dir2))=
- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(setq buf (dired (expand-fil= e-name "dir*/*.txt" dir)))
+ =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0(setq buf (dired (cons dir (file-expand-wildcards "dir*/*.tx= t"))))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(dired-toggl= e-marks)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(should (cdr (d= ired-get-marked-files))))
=C2=A0 =C2=A0 =C2=A0 =C2=A0(delete-dire= ctory dir 'recursive)
diff --git a/test/lisp/eshell/em-ls-tes= ts.el b/test/lisp/eshell/em-ls-tests.el
index 71a555d1ea..cc0e68c= 47d 100644
--- a/test/lisp/eshell/em-ls-tests.el
+++ b/= test/lisp/eshell/em-ls-tests.el
@@ -42,7 +42,7 @@
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(make-directory dir2)
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(with-temp-file (expand-file-name &qu= ot;a.txt" dir1))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(w= ith-temp-file (expand-file-name "b.txt" dir2))
- =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0(setq buf (dired (expand-file-name "dir*/*= .txt" dir)))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(setq buf (= dired (cons dir (file-expand-wildcards "dir*/*.txt"))))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(dired-toggle-marks)
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(should (cdr (dired-get-marked-fil= es))))
=C2=A0 =C2=A0 =C2=A0 =C2=A0(customize-set-variable 'es= hell-ls-use-in-dired orig)
diff --git a/test/lisp/ls-lisp-tests.e= l b/test/lisp/ls-lisp-tests.el
index d24b30e5f2..77a02c88dd 10064= 4
--- a/test/lisp/ls-lisp-tests.el
+++ b/test/lisp/ls-l= isp-tests.el
@@ -69,7 +69,7 @@
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(make-directory dir2)
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(with-temp-file (expand-file-name "a.txt" dir1))=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(with-temp-file (expand= -file-name "b.txt" dir2))
- =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0(setq buf (dired (expand-file-name "dir*/*.txt" dir)))
+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(setq buf (dired (cons dir (file= -expand-wildcards "dir*/*.txt"))))
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0(dired-toggle-marks)
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0(should (cdr (dired-get-marked-files))))
=C2= =A0 =C2=A0 =C2=A0 =C2=A0(delete-directory dir 'recursive)

Am I wrong thinking that `expand-file-name' is not su= pposed to expand "dir*/*.txt"?

Fabrice


2017-08-04 15:18 GMT+02:00 Eli Zaretskii <eliz@gnu.org>:<= br>
> From: Tino Calancha <tino.calancha@gmail.com>
> Date: Wed, 2 Aug 2017 15:44:59 +0900 (JST)
> cc: Eli Zaretskii <eliz@gnu.org= >, Tino Calancha <tino.cal= ancha@gmail.com>,
>=C2=A0 =C2=A0 =C2=A0Emacs developers <emacs-devel@gnu.org>
>
> > 2017-08-01 21:04 GMT+02:00 Eli Zaretskii <eliz@gnu.org>:
> >
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0Only if there's no better way.=C2= =A0 The Patch invocation definitely needs
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0the --binary switch on Windows, though.= =C2=A0 But the failure above is not
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0about that, it's about something el= se, because directory-files returns
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0an empty list.=C2=A0 Something prevents= Patch from creating backup files.
> >
> >
> > When I add the '--binary' option to patch, the test passe= s.
> > Again, windows 10, mingw64.
> Fabrice, Eli
> does the following work in your environments?

Yes, it passes now.

Thanks!

--94eb2c06f45c8d98790555ed829d--