From 4c08509b3a250781039b9f957a9615ea9afe6aa9 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Tue, 9 May 2017 14:35:56 +0200 Subject: [PATCH] * test/lisp/net/tramp-tests.el: Keep additional test. --- test/lisp/net/tramp-tests.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 8db54979b6d..a380e95c1a1 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -1744,12 +1744,14 @@ This checks also `file-name-as-directory', `file-name-directory', (let ((tmp-name (tramp--test-make-temp-name nil quoted))) (unwind-protect (progn + ;; Write buffer. (with-temp-buffer (insert "foo") (write-region nil nil tmp-name)) (with-temp-buffer (insert-file-contents tmp-name) (should (string-equal (buffer-string) "foo"))) + ;; Append. (with-temp-buffer (insert "bla") @@ -1757,11 +1759,19 @@ This checks also `file-name-as-directory', `file-name-directory', (with-temp-buffer (insert-file-contents tmp-name) (should (string-equal (buffer-string) "foobla"))) + (with-temp-buffer + (insert "baz") + (write-region nil nil tmp-name 3)) + (with-temp-buffer + (insert-file-contents tmp-name) + (should (string-equal (buffer-string) "foobaz"))) + ;; Write string. (write-region "foo" nil tmp-name) (with-temp-buffer (insert-file-contents tmp-name) (should (string-equal (buffer-string) "foo"))) + ;; Write partly. (with-temp-buffer (insert "123456789") -- 2.39.2