Subject: bug#65685: 29.1; Inconsistent behavior of quoted file name "/:~" across platforms

From: Mattias Engdegård <[email-masked]>
Date: Sun, 15 Oct 2023 22:12:27 +0200

After the change, files-tests fail. 

Test files-tests-file-name-non-special-expand-file-name-tilde backtrace:
  signal(ert-test-failed (((should (equal (expand-file-name nospecial)
  ert-fail(((should (equal (expand-file-name nospecial) (expand-file-n
  (if (unwind-protect (setq value-354 (apply fn-352 args-353)) (setq f
  (let (form-description-356) (if (unwind-protect (setq value-354 (app
  (let ((value-354 'ert-form-evaluation-aborted-355)) (let (form-descr
  (let* ((fn-352 #'equal) (args-353 (condition-case err (let ((signal-
  (progn (let (file-name-handler-alist) (setq nospecial (file-name-quo
  (unwind-protect (progn (let (file-name-handler-alist) (setq nospecia
  (let* ((temporary-file-directory (file-truename temporary-file-direc
  (let ((process-environment (cons (format "HOME=%s" temporary-file-di
  (closure (t) nil (let ((process-environment (cons (format "HOME=%s" 
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name files-tests-file-name-non-special-exp
  ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
  ert-run-tests((not (or (tag :unstable) (tag :nativecomp))) #f(compil
  ert-run-tests-batch((not (or (tag :unstable) (tag :nativecomp))))
  ert-run-tests-batch-and-exit((not (or (tag :unstable) (tag :nativeco
  eval((ert-run-tests-batch-and-exit '(not (or (tag :unstable) (tag :n
  command-line-1(("-L" ":../../emacs/test" "-l" "ert" "-l" "lisp/files
  command-line()
  normal-top-level()
Test files-tests-file-name-non-special-expand-file-name-tilde condition:
    (ert-test-failed
     ((should (equal (expand-file-name nospecial) (expand-file-name ...)))
      :form
      (equal
       "/:/private/var/folders/qy/zstv16390nlcs47kz8nff_mm0000gn/T/files-testsgcrggv/files-testsHn7mpT"
       "/private/var/folders/qy/zstv16390nlcs47kz8nff_mm0000gn/T/files-testsgcrggv/files-testsHn7mpT")
      :value nil :explanation
      (arrays-of-different-length 94 92
				  "/:/private/var/folders/qy/zstv16390nlcs47kz8nff_mm0000gn/T/files-testsgcrggv/files-testsHn7mpT"
				  "/private/var/folders/qy/zstv16390nlcs47kz8nff_mm0000gn/T/files-testsgcrggv/files-testsHn7mpT"
				  first-mismatch-at 1)))
   FAILED   45/113  files-tests-file-name-non-special-expand-file-name-tilde (0.000818 sec) at ../../emacs/test/lisp/files-tests.el:686