aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMichael Albinus2020-06-10 19:36:53 +0200
committerMichael Albinus2020-06-10 19:36:53 +0200
commitb19259c8412ee2e715c4bd145711e23729411fd0 (patch)
tree6e79f2d9bc1dd3ab3533380faa441e5564eb7149 /test
parentee8b2742d7f6d03daea37f1bac48c2746f7ca789 (diff)
downloademacs-b19259c8412ee2e715c4bd145711e23729411fd0.tar.gz
emacs-b19259c8412ee2e715c4bd145711e23729411fd0.zip
Futher tramp-crypt implementation and documentation
* doc/misc/tramp.texi (Top, Configuration): Insert section `Keeping files encrypted' in menu. (Keeping files encrypted): New node. * lisp/net/tramp-crypt.el (tramp-crypt-file-name-handler-alist): Add `tramp-set-file-uid-gid'. (tramp-crypt-maybe-open-connection): Simplify. (tramp-crypt-do-encrypt-or-decrypt-file): Use `binary' coding system. (tramp-crypt-handle-set-file-uid-gid): New defun. * test/lisp/net/tramp-tests.el (tramp-test09-insert-file-contents): Adapt test.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/net/tramp-tests.el25
1 files changed, 17 insertions, 8 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index d578c359d79..578da4171c7 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -2294,16 +2294,25 @@ This checks also `file-name-as-directory', `file-name-directory',
2294 (unwind-protect 2294 (unwind-protect
2295 (with-temp-buffer 2295 (with-temp-buffer
2296 (write-region "foo" nil tmp-name) 2296 (write-region "foo" nil tmp-name)
2297 (insert-file-contents tmp-name) 2297 (let ((point (point)))
2298 (should (string-equal (buffer-string) "foo")) 2298 (insert-file-contents tmp-name)
2299 (insert-file-contents tmp-name) 2299 (should (string-equal (buffer-string) "foo"))
2300 (should (string-equal (buffer-string) "foofoo")) 2300 (should (= point (point))))
2301 (goto-char (1+ (point)))
2302 (let ((point (point)))
2303 (insert-file-contents tmp-name)
2304 (should (string-equal (buffer-string) "ffoooo"))
2305 (should (= point (point))))
2301 ;; Insert partly. 2306 ;; Insert partly.
2302 (insert-file-contents tmp-name nil 1 3) 2307 (let ((point (point)))
2303 (should (string-equal (buffer-string) "oofoofoo")) 2308 (insert-file-contents tmp-name nil 1 3)
2309 (should (string-equal (buffer-string) "foofoooo"))
2310 (should (= point (point))))
2304 ;; Replace. 2311 ;; Replace.
2305 (insert-file-contents tmp-name nil nil nil 'replace) 2312 (let ((point (point)))
2306 (should (string-equal (buffer-string) "foo")) 2313 (insert-file-contents tmp-name nil nil nil 'replace)
2314 (should (string-equal (buffer-string) "foo"))
2315 (should (= point (point))))
2307 ;; Error case. 2316 ;; Error case.
2308 (delete-file tmp-name) 2317 (delete-file tmp-name)
2309 (should-error 2318 (should-error