emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 7c7966862bc: * test/lisp/net/tramp-tests.el (tramp-test10-write


From: Michael Albinus
Subject: emacs-29 7c7966862bc: * test/lisp/net/tramp-tests.el (tramp-test10-write-region): Extend test.
Date: Sun, 6 Aug 2023 08:31:11 -0400 (EDT)

branch: emacs-29
commit 7c7966862bc0126e0f5b8c6d760cc3293d9a87f6
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>

    * test/lisp/net/tramp-tests.el (tramp-test10-write-region): Extend test.
---
 test/lisp/net/tramp-tests.el | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 00e368abe4d..f4938cf9a01 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -2676,7 +2676,18 @@ This checks also `file-name-as-directory', 
`file-name-directory',
              :type 'file-already-exists)
            (should-error
             (write-region "foo" nil tmp-name nil nil nil 'excl)
-            :type 'file-already-exists))
+            :type 'file-already-exists)
+           (delete-file tmp-name)
+
+           ;; Check `buffer-file-coding-system'.  Bug#65022.
+           (with-temp-buffer
+             (setq buffer-file-name tmp-name)
+             (insert "foo")
+             (set-buffer-file-coding-system 'cp1251)
+             (let ((bfcs buffer-file-coding-system))
+               (should (buffer-modified-p))
+               (should (null (save-buffer)))
+               (should (eq buffer-file-coding-system bfcs)))))
 
        ;; Cleanup.
        (ignore-errors (delete-file tmp-name))))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]