From 328766e02145fcfcdd54c124ff866ce8f2e15d59 Mon Sep 17 00:00:00 2001 From: Ken Brown 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