diff options
| author | Michael Albinus | 2014-06-24 09:48:19 +0200 |
|---|---|---|
| committer | Michael Albinus | 2014-06-24 09:48:19 +0200 |
| commit | b6266364bd99d506753fc3b78dda69de23bdc5d6 (patch) | |
| tree | 9213727d9c478b3f5d16667bb97844c8103a03f2 | |
| parent | 131a3a12c4b0171c71c122c3330f85fc19e9bb8f (diff) | |
| download | emacs-b6266364bd99d506753fc3b78dda69de23bdc5d6.tar.gz emacs-b6266364bd99d506753fc3b78dda69de23bdc5d6.zip | |
* automated/tramp-tests.el (tramp-test26-process-file): Extend test
according to Bug#17815.
| -rw-r--r-- | test/ChangeLog | 5 | ||||
| -rw-r--r-- | test/automated/tramp-tests.el | 27 |
2 files changed, 23 insertions, 9 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index b90f47631bc..08492dd4c8f 100644 --- a/test/ChangeLog +++ b/test/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-06-24 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * automated/tramp-tests.el (tramp-test26-process-file): Extend test | ||
| 4 | according to Bug#17815. | ||
| 5 | |||
| 1 | 2014-06-21 Fabián Ezequiel Gallina <fgallina@gnu.org> | 6 | 2014-06-21 Fabián Ezequiel Gallina <fgallina@gnu.org> |
| 2 | 7 | ||
| 3 | * automated/python-tests.el (python-util-strip-string-1): New test. | 8 | * automated/python-tests.el (python-util-strip-string-1): New test. |
diff --git a/test/automated/tramp-tests.el b/test/automated/tramp-tests.el index d30a5b0c9a7..b010ab467f6 100644 --- a/test/automated/tramp-tests.el +++ b/test/automated/tramp-tests.el | |||
| @@ -1246,9 +1246,10 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 1246 | (tramp-find-foreign-file-name-handler tramp-test-temporary-file-directory) | 1246 | (tramp-find-foreign-file-name-handler tramp-test-temporary-file-directory) |
| 1247 | '(tramp-gvfs-file-name-handler tramp-smb-file-name-handler)))) | 1247 | '(tramp-gvfs-file-name-handler tramp-smb-file-name-handler)))) |
| 1248 | 1248 | ||
| 1249 | (let ((tmp-name (tramp--test-make-temp-name)) | 1249 | (let* ((tmp-name (tramp--test-make-temp-name)) |
| 1250 | (default-directory tramp-test-temporary-file-directory) | 1250 | (fnnd (file-name-nondirectory tmp-name)) |
| 1251 | kill-buffer-query-functions) | 1251 | (default-directory tramp-test-temporary-file-directory) |
| 1252 | kill-buffer-query-functions) | ||
| 1252 | (unwind-protect | 1253 | (unwind-protect |
| 1253 | (progn | 1254 | (progn |
| 1254 | ;; We cannot use "/bin/true" and "/bin/false"; those paths | 1255 | ;; We cannot use "/bin/true" and "/bin/false"; those paths |
| @@ -1259,17 +1260,25 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 1259 | (with-temp-buffer | 1260 | (with-temp-buffer |
| 1260 | (write-region "foo" nil tmp-name) | 1261 | (write-region "foo" nil tmp-name) |
| 1261 | (should (file-exists-p tmp-name)) | 1262 | (should (file-exists-p tmp-name)) |
| 1262 | (should | 1263 | (should (zerop (process-file "ls" nil t nil fnnd))) |
| 1263 | (zerop | 1264 | ;; `ls' could produce colorized output. |
| 1264 | (process-file "ls" nil t nil (file-name-nondirectory tmp-name)))) | 1265 | (goto-char (point-min)) |
| 1266 | (while (re-search-forward tramp-color-escape-sequence-regexp nil t) | ||
| 1267 | (replace-match "" nil nil)) | ||
| 1268 | (should (string-equal (format "%s\n" fnnd) (buffer-string))) | ||
| 1269 | (should-not (get-buffer-window (current-buffer) t)) | ||
| 1270 | |||
| 1271 | ;; Second run. The output must be appended. | ||
| 1272 | (should (zerop (process-file "ls" nil t t fnnd))) | ||
| 1265 | ;; `ls' could produce colorized output. | 1273 | ;; `ls' could produce colorized output. |
| 1266 | (goto-char (point-min)) | 1274 | (goto-char (point-min)) |
| 1267 | (while (re-search-forward tramp-color-escape-sequence-regexp nil t) | 1275 | (while (re-search-forward tramp-color-escape-sequence-regexp nil t) |
| 1268 | (replace-match "" nil nil)) | 1276 | (replace-match "" nil nil)) |
| 1269 | (should | 1277 | (should |
| 1270 | (string-equal | 1278 | (string-equal (format "%s\n%s\n" fnnd fnnd) (buffer-string))) |
| 1271 | (format "%s\n" (file-name-nondirectory tmp-name)) | 1279 | ;; A non-nil DISPLAY must not raise the buffer. |
| 1272 | (buffer-string))))) | 1280 | (should-not (get-buffer-window (current-buffer) t)))) |
| 1281 | |||
| 1273 | (ignore-errors (delete-file tmp-name))))) | 1282 | (ignore-errors (delete-file tmp-name))))) |
| 1274 | 1283 | ||
| 1275 | (ert-deftest tramp-test27-start-file-process () | 1284 | (ert-deftest tramp-test27-start-file-process () |