diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/erc/erc-scenarios-base-local-modules.el | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/test/lisp/erc/erc-scenarios-base-local-modules.el b/test/lisp/erc/erc-scenarios-base-local-modules.el index 71923cc11f2..1d670b8f508 100644 --- a/test/lisp/erc/erc-scenarios-base-local-modules.el +++ b/test/lisp/erc/erc-scenarios-base-local-modules.el | |||
| @@ -117,20 +117,25 @@ | |||
| 117 | (erc-cmd-QUIT "") | 117 | (erc-cmd-QUIT "") |
| 118 | (funcall expect 10 "finished"))) | 118 | (funcall expect 10 "finished"))) |
| 119 | 119 | ||
| 120 | (ert-info ("Disabling works from a target buffer") | 120 | (ert-info ("Explicit disabling affects entire session") |
| 121 | ;; Even though the mode variable is nil (but locally bound) in | ||
| 122 | ;; this target buffer, disabling interactively with | ||
| 123 | ;; `erc-sasl-disable', deactivates the module session-wide. | ||
| 121 | (with-current-buffer "#chan" | 124 | (with-current-buffer "#chan" |
| 122 | (should erc-sasl-mode) | ||
| 123 | (call-interactively #'erc-sasl-disable) | ||
| 124 | (should-not erc-sasl-mode) | 125 | (should-not erc-sasl-mode) |
| 125 | (should (local-variable-p 'erc-sasl-mode)) | 126 | (should (local-variable-p 'erc-sasl-mode)) |
| 127 | (should (buffer-local-value 'erc-sasl-mode (get-buffer "foonet"))) | ||
| 128 | (call-interactively #'erc-sasl-disable) | ||
| 126 | (should-not (buffer-local-value 'erc-sasl-mode (get-buffer "foonet"))) | 129 | (should-not (buffer-local-value 'erc-sasl-mode (get-buffer "foonet"))) |
| 130 | (should-not erc-sasl-mode) | ||
| 127 | (erc-cmd-RECONNECT) | 131 | (erc-cmd-RECONNECT) |
| 128 | (funcall expect 10 "Some enigma, some riddle") | 132 | (funcall expect 10 "Some enigma, some riddle") |
| 129 | (should-not erc-sasl-mode) ; regression | 133 | (should-not erc-sasl-mode) |
| 130 | (should (local-variable-p 'erc-sasl-mode))) | 134 | (should (local-variable-p 'erc-sasl-mode))) |
| 131 | 135 | ||
| 132 | (with-current-buffer "foonet" | 136 | (with-current-buffer "foonet" |
| 133 | (should (local-variable-p 'erc-sasl-mode)) | 137 | (should (local-variable-p 'erc-sasl-mode)) |
| 138 | (should-not erc-sasl-mode) | ||
| 134 | (funcall expect 10 "User modes for tester`") | 139 | (funcall expect 10 "User modes for tester`") |
| 135 | (erc-cmd-QUIT "") | 140 | (erc-cmd-QUIT "") |
| 136 | (funcall expect 10 "finished"))) | 141 | (funcall expect 10 "finished"))) |
| @@ -139,7 +144,8 @@ | |||
| 139 | (with-current-buffer "#chan" | 144 | (with-current-buffer "#chan" |
| 140 | (call-interactively #'erc-sasl-enable) | 145 | (call-interactively #'erc-sasl-enable) |
| 141 | (should (local-variable-p 'erc-sasl-mode)) | 146 | (should (local-variable-p 'erc-sasl-mode)) |
| 142 | (should erc-sasl-mode) | 147 | (should-not erc-sasl-mode) |
| 148 | (should (buffer-local-value 'erc-sasl-mode (get-buffer "foonet"))) | ||
| 143 | (erc-cmd-RECONNECT) | 149 | (erc-cmd-RECONNECT) |
| 144 | (funcall expect 10 "Well met; good morrow, Titus and Hortensius.") | 150 | (funcall expect 10 "Well met; good morrow, Titus and Hortensius.") |
| 145 | (erc-cmd-QUIT "")) | 151 | (erc-cmd-QUIT "")) |