Subject: Re: bug#21831: 24.5 on Windows; start-process modifies its PROGRAM argument

From: Nicolas Richard <[email-masked]>
Date: Thu, 05 Nov 2015 09:42:54 +0100

Eli Zaretskii <[email-masked]> writes:

>> From: Cornelius Mika <[email-masked]>
>> Minimal repro:
>> (let ((path "c:/Windows/System32/clip.exe"))
>> (start-process "" nil path)
>> path) ; => "c:\\Windows\\System32\\clip.exe"

> I can reproduce this in Emacs 24.5, but not in the current development
> sources.  So this problem was already fixed as part of the development
> since then, and I see the code which was added to avoid this.

Thanks for checking.
Did you see a test associated to this fix ?

perhaps something like :

(ert-deftest start-process-should-not-modify-arguments ()
  "`start-process' must not modify its arguments in-place."
  ;; See bug#21831.
  (let* ((path (pcase system-type
                 ('windows-nt  "c:/Windows/System32/clip.exe")
                 ('ms-dos "c:/command.com")
                 (_ "/bin//sh")))
         (samepath (copy-sequence path)))
    (start-process "" nil path)
    (should (equal path samepath))))

to be included in test/automated/process-tests.el

I'm not sure what a good value of `path' might be.

-- 
Nico.