diff options
Diffstat (limited to 'test/lisp')
-rw-r--r-- | test/lisp/files-x-tests.el | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/lisp/files-x-tests.el b/test/lisp/files-x-tests.el index 60787e1cd3d..7ee2f0c1a65 100644 --- a/test/lisp/files-x-tests.el +++ b/test/lisp/files-x-tests.el @@ -325,6 +325,9 @@ (should-not (boundp 'remote-shell-file-name)) (should (string-equal (symbol-value 'remote-null-device) "null")) + (connection-local-set-profiles + files-x-test--application 'remote-bash) + (with-connection-local-variables ;; All connection-local variables are set. They apply in ;; reverse order in `connection-local-variables-alist'. @@ -347,6 +350,21 @@ (should (string-equal (symbol-value 'remote-shell-file-name) "/bin/ksh")) (should + (string-equal (symbol-value 'remote-null-device) "/dev/null")) + + ;; Run another instance of `with-connection-local-variables' + ;; with a different application. + (let ((connection-local-default-application (cadr files-x-test--application))) + (with-connection-local-variables + ;; The proper variable values are set. + (should + (string-equal (symbol-value 'remote-shell-file-name) "/bin/bash")) + (should + (string-equal (symbol-value 'remote-null-device) "/dev/null")))) + ;; The variable values are reset. + (should + (string-equal (symbol-value 'remote-shell-file-name) "/bin/ksh")) + (should (string-equal (symbol-value 'remote-null-device) "/dev/null"))) ;; Everything is rewound. The old variable values are reset. |