From: Ken Brown <kbrown@cornell.edu>
To: 32304@debbugs.gnu.org
Subject: bug#32304: 27.0.50; tramp-tests issue with double slash
Date: Sun, 29 Jul 2018 11:54:10 -0400 [thread overview]
Message-ID: <e5999041-a8fc-647f-2c69-a52365e52985@cornell.edu> (raw)
[-- Attachment #1: Type: text/plain, Size: 1253 bytes --]
The following parts of tramp-test04-substitute-in-file-name are failing
on Cygwin (and probably also on MS-Windows, but I can't easily test
that):
(should
(string-equal
(substitute-in-file-name "/method:host://foo") "/method:host:/foo"))
(should
(string-equal (substitute-in-file-name "/method:host:/path///foo")
"/foo"))
(should
(string-equal (substitute-in-file-name "/method:host://~foo") "/~foo"))
Here are the corresponding evaluations:
(substitute-in-file-name "/method:host://foo")
"/method:host://foo"
(substitute-in-file-name "/method:host:/path///foo")
"//foo"
(substitute-in-file-name "/method:host://~foo")
"//~foo"
This is a consequence of the fact that Tramp calls
substitute-in-file-name on the local part of the file name:
(substitute-in-file-name "//foo")
"//foo"
(substitute-in-file-name "/path///foo")
"//foo"
(substitute-in-file-name "//~foo")
"//~foo"
"//" has a special meaning at the beginning of a file name on Cygwin and
MS-Windows; see the comment near the beginning of
search_embedded_absfilename. So I don't think there's a real bug here.
Maybe the expected result of the test should simply be adjusted, as in
the attached patch. Someone who builds on MS-Windows would have to
check this.
Ken
[-- Attachment #2: 0001-Adjust-expected-results-on-a-tramp-test.patch --]
[-- Type: text/plain, Size: 1961 bytes --]
From 328766e02145fcfcdd54c124ff866ce8f2e15d59 Mon Sep 17 00:00:00 2001
From: Ken Brown <kbrown@cornell.edu>
Date: Sun, 29 Jul 2018 11:45:26 -0400
Subject: [PATCH] Adjust expected results on a tramp test
* test/lisp/net/tramp-tests.el
(tramp-test04-substitute-in-file-name): Adjust the expected
results on Cygwin and MS-Windows, where "//" at the beginning
of a file name has a special meaning. (Bug#99999)
---
test/lisp/net/tramp-tests.el | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 5c5eff8798..a29df1682c 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -1781,9 +1781,15 @@ tramp--test-print-duration
(should (string-equal (substitute-in-file-name "/method:host:///foo") "/foo"))
(should
(string-equal
- (substitute-in-file-name "/method:host://foo") "/method:host:/foo"))
+ (substitute-in-file-name "/method:host://foo")
+ (if (memq system-type '(cygwin windows-nt))
+ "/method:host://foo"
+ "/method:host:/foo")))
(should
- (string-equal (substitute-in-file-name "/method:host:/path///foo") "/foo"))
+ (string-equal (substitute-in-file-name "/method:host:/path///foo")
+ (if (memq system-type '(cygwin windows-nt))
+ "//foo"
+ "/foo")))
(should
(string-equal
(substitute-in-file-name "/method:host:/path//foo") "/method:host:/foo"))
@@ -1804,7 +1810,10 @@ tramp--test-print-duration
"/method:host:/:/path//foo"))
(should
- (string-equal (substitute-in-file-name "/method:host://~foo") "/~foo"))
+ (string-equal (substitute-in-file-name "/method:host://~foo")
+ (if (memq system-type '(cygwin windows-nt))
+ "//~foo"
+ "/~foo")))
(should
(string-equal
(substitute-in-file-name "/method:host:/~foo") "/method:host:/~foo"))
--
2.17.0
next reply other threads:[~2018-07-29 15:54 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-29 15:54 Ken Brown [this message]
2018-07-29 16:27 ` bug#32304: 27.0.50; tramp-tests issue with double slash Michael Albinus
2018-07-29 16:47 ` Ken Brown
2018-07-29 16:55 ` Michael Albinus
2018-07-29 17:00 ` Ken Brown
2018-07-30 10:43 ` Michael Albinus
2018-07-30 12:17 ` Ken Brown
2018-07-30 14:45 ` Eli Zaretskii
2018-07-30 20:50 ` Michael Albinus
2018-07-31 2:34 ` Eli Zaretskii
2018-07-31 5:00 ` Michael Albinus
2018-08-08 13:48 ` Michael Albinus
2018-08-08 14:35 ` Eli Zaretskii
2018-08-08 14:42 ` Eli Zaretskii
2018-08-08 18:06 ` Michael Albinus
2018-08-09 12:24 ` Michael Albinus
2018-08-09 15:18 ` Eli Zaretskii
2018-08-10 7:27 ` Michael Albinus
2018-08-08 15:26 ` Michael Albinus
2018-08-08 15:57 ` Eli Zaretskii
2018-07-31 4:58 ` Michael Albinus
2018-07-29 17:26 ` Eli Zaretskii
2018-07-30 8:26 ` Michael Albinus
2018-07-31 14:46 ` Andy Moreton
2018-07-31 20:57 ` Michael Albinus
2018-07-31 22:07 ` Ken Brown
2018-08-01 20:51 ` Michael Albinus
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e5999041-a8fc-647f-2c69-a52365e52985@cornell.edu \
--to=kbrown@cornell.edu \
--cc=32304@debbugs.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.