diff options
| -rw-r--r-- | test/automated/process-tests.el | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/automated/process-tests.el b/test/automated/process-tests.el index 58a2de7451d..4a43a013fb4 100644 --- a/test/automated/process-tests.el +++ b/test/automated/process-tests.el | |||
| @@ -142,4 +142,22 @@ | |||
| 142 | (should (equal "hello stderr!\n" | 142 | (should (equal "hello stderr!\n" |
| 143 | (mapconcat #'identity (nreverse stderr-output) ""))))) | 143 | (mapconcat #'identity (nreverse stderr-output) ""))))) |
| 144 | 144 | ||
| 145 | (ert-deftest start-process-should-not-modify-arguments () | ||
| 146 | "`start-process' must not modify its arguments in-place." | ||
| 147 | ;; See bug#21831. | ||
| 148 | (let* ((path (pcase system-type | ||
| 149 | ((or 'windows-nt 'ms-dos) | ||
| 150 | ;; Make sure the file name uses forward slashes. | ||
| 151 | ;; The original bug was that 'start-process' would | ||
| 152 | ;; convert forward slashes to backslashes. | ||
| 153 | (expand-file-name (executable-find "attrib.exe"))) | ||
| 154 | (_ "/bin//sh"))) | ||
| 155 | (samepath (copy-sequence path))) | ||
| 156 | ;; Make sure 'start-process' actually goes all the way and invokes | ||
| 157 | ;; the program. | ||
| 158 | (should (process-live-p (condition-case nil | ||
| 159 | (start-process "" nil path) | ||
| 160 | (error nil)))) | ||
| 161 | (should (equal path samepath)))) | ||
| 162 | |||
| 145 | (provide 'process-tests) | 163 | (provide 'process-tests) |