Subject: Re: bug#26911: 25.2; eshell "cd .." doesn't work correctly with TRAMP

From: Eli Zaretskii <[email-masked]>
Date: Fri, 28 Aug 2020 10:01:43 +0300

> Date: Fri, 28 Aug 2020 09:39:38 +0300
> From: Eli Zaretskii <[email-masked]>
> Cc: [email-masked], [email-masked], [email-masked],
>  [email-masked]
> 
> > Cc: Michael Albinus <[email-masked]>, [email-masked],
> >  Eli Zaretskii <[email-masked]>, Yegor Timoshenko <[email-masked]>
> > From: Paul Eggert <[email-masked]>
> > Date: Thu, 27 Aug 2020 14:53:52 -0700
> > 
> > Thanks for reporting that. Sigh, too often when I fix one bug in 
> > expand-file-name I introduce another. I installed the attached patch to fix this 
> > bug (I and I hope it doesn't introduce yet another :-).
> 
> Two tests (including the new one) fail here on MS-Windows:

I've now fixed most of the failures, but one still remains, and it
definitely seems to be due to the latest changes in expand-file-name,
note the "c:." part below:

  Test fileio-tests--expand-file-name-trailing-slash backtrace:
    signal(ert-test-failed (((should (equal (expand-file-name (concat "c
    ert-fail(((should (equal (expand-file-name (concat "c:/" fooslashali
    (if (unwind-protect (setq value-207 (apply fn-205 args-206)) (setq f
    (let (form-description-209) (if (unwind-protect (setq value-207 (app
    (let ((value-207 'ert-form-evaluation-aborted-208)) (let (form-descr
    (let* ((fn-205 #'equal) (args-206 (condition-case err (let ((signal-
    (progn (let* ((fn-200 #'equal) (args-201 (condition-case err (let ((
    (if (memq system-type '(windows-nt ms-dos)) (progn (let* ((fn-200 #'
    (let ((fooslashalias (car --dolist-tail--))) (if (memq system-type '
    (while --dolist-tail-- (let ((fooslashalias (car --dolist-tail--))) 
    (let ((--dolist-tail-- '("foo/" "foo//" "foo/." "foo//." "foo///././
    (closure (t) nil (let ((--dolist-tail-- '("foo/" "foo//" "foo/." "fo
    ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
    ert-run-test(#s(ert-test :name fileio-tests--expand-file-name-traili
    ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
    ert-run-tests((not (tag :unstable)) #f(compiled-function (event-type
    ert-run-tests-batch((not (tag :unstable)))
    ert-run-tests-batch-and-exit((not (tag :unstable)))
    eval((ert-run-tests-batch-and-exit '(not (tag :unstable))) t)
    command-line-1(("-L" ";." "-l" "ert" "-l" "src/fileio-tests.el" "--e
    command-line()
    normal-top-level()
  Test fileio-tests--expand-file-name-trailing-slash condition:
      (ert-test-failed
       ((should
	 (equal
	  (expand-file-name ...)
	  "c:/foo/"))
	:form
	(equal "c:./foo/" "c:/foo/")
	:value nil :explanation
	(arrays-of-different-length 8 7 "c:./foo/" "c:/foo/" first-mismatch-at 2)))
     FAILED   5/12  fileio-tests--expand-file-name-trailing-slash (0.000000 sec)