Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
b6266364
Commit
b6266364
authored
Jun 24, 2014
by
Michael Albinus
Browse files
* automated/tramp-tests.el (tramp-test26-process-file): Extend test
according to Bug#17815.
parent
131a3a12
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
9 deletions
+23
-9
test/ChangeLog
test/ChangeLog
+5
-0
test/automated/tramp-tests.el
test/automated/tramp-tests.el
+18
-9
No files found.
test/ChangeLog
View file @
b6266364
2014-06-24 Michael Albinus <michael.albinus@gmx.de>
* automated/tramp-tests.el (tramp-test26-process-file): Extend test
according to Bug#17815.
2014-06-21 Fabián Ezequiel Gallina <fgallina@gnu.org>
* automated/python-tests.el (python-util-strip-string-1): New test.
...
...
test/automated/tramp-tests.el
View file @
b6266364
...
...
@@ -1246,9 +1246,10 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
(tramp-find-foreign-file-name-handler tramp-test-temporary-file-directory)
'(tramp-gvfs-file-name-handler tramp-smb-file-name-handler))))
(
let
((
tmp-name
(
tramp--test-make-temp-name
))
(
default-directory
tramp-test-temporary-file-directory
)
kill-buffer-query-functions
)
(let* ((tmp-name (tramp--test-make-temp-name))
(fnnd (file-name-nondirectory tmp-name))
(default-directory tramp-test-temporary-file-directory)
kill-buffer-query-functions)
(unwind-protect
(progn
;; 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'."
(with-temp-buffer
(write-region "foo" nil tmp-name)
(should (file-exists-p tmp-name))
(
should
(
zerop
(
process-file
"ls"
nil
t
nil
(
file-name-nondirectory
tmp-name
))))
(should (zerop (process-file "ls" nil t nil fnnd)))
;; `ls' could produce colorized output.
(goto-char (point-min))
(while (re-search-forward tramp-color-escape-sequence-regexp nil t)
(replace-match "" nil nil))
(should (string-equal (format "%s\n" fnnd) (buffer-string)))
(should-not (get-buffer-window (current-buffer) t))
;; Second run. The output must be appended.
(should (zerop (process-file "ls" nil t t fnnd)))
;; `ls' could produce colorized output.
(goto-char (point-min))
(while (re-search-forward tramp-color-escape-sequence-regexp nil t)
(replace-match "" nil nil))
(should
(
string-equal
(
format
"%s\n"
(
file-name-nondirectory
tmp-name
))
(
buffer-string
)))))
(string-equal (format "%s\n%s\n" fnnd fnnd) (buffer-string)))
;; A non-nil DISPLAY must not raise the buffer.
(should-not (get-buffer-window (current-buffer) t))))
(ignore-errors (delete-file tmp-name)))))
(ert-deftest tramp-test27-start-file-process ()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment