diff options
Diffstat (limited to 'test/lisp/erc')
-rw-r--r-- | test/lisp/erc/erc-scenarios-sasl.el | 34 | ||||
-rw-r--r-- | test/lisp/erc/erc-scenarios-status-sidebar.el | 3 | ||||
-rw-r--r-- | test/lisp/erc/resources/sasl/plain-failed.eld | 10 |
3 files changed, 24 insertions, 23 deletions
diff --git a/test/lisp/erc/erc-scenarios-sasl.el b/test/lisp/erc/erc-scenarios-sasl.el index ab652d72dd2..74075b1aaf3 100644 --- a/test/lisp/erc/erc-scenarios-sasl.el +++ b/test/lisp/erc/erc-scenarios-sasl.el @@ -149,23 +149,25 @@ (erc-modules (cons 'sasl erc-modules)) (erc-sasl-password "wrong") (erc-sasl-mechanism 'plain) - (expect (erc-d-t-make-expecter)) - (buf nil)) + (erc--warnings-buffer-name "*ERC test warnings*") + (warnings-buffer (get-buffer-create erc--warnings-buffer-name)) + (expect (erc-d-t-make-expecter))) - (ert-info ("Connect") - (setq buf (erc :server "127.0.0.1" - :port port - :nick "tester" - :user "tester" - :full-name "tester")) - (let ((err (should-error - (with-current-buffer buf - (funcall expect 20 "Connection failed!"))))) - (should (string-search "please review" (cadr err))) - (with-current-buffer buf - (funcall expect 10 "Opening connection") - (funcall expect 20 "SASL authentication failed") - (should-not (erc-server-process-alive))))))) + (with-current-buffer (erc :server "127.0.0.1" + :port port + :nick "tester" + :user "tester" + :full-name "tester") + (funcall expect 10 "Opening connection") + (funcall expect 20 "SASL authentication failed") + (funcall expect 20 "Connection failed!") + (should-not (erc-server-process-alive))) + + (with-current-buffer warnings-buffer + (funcall expect 10 "please review SASL settings"))) + + (when noninteractive + (should-not (get-buffer "*ERC test warnings*")))) (defun erc-scenarios--common--sasl (mech) (erc-scenarios-common-with-cleanup diff --git a/test/lisp/erc/erc-scenarios-status-sidebar.el b/test/lisp/erc/erc-scenarios-status-sidebar.el index 3a047bf3983..b2b6351e333 100644 --- a/test/lisp/erc/erc-scenarios-status-sidebar.el +++ b/test/lisp/erc/erc-scenarios-status-sidebar.el @@ -64,8 +64,7 @@ (let ((obuf (window-buffer))) ; *scratch* (set-window-buffer (selected-window) "#foo") (erc-d-t-wait-for 5 - (when noninteractive - (erc-status-sidebar-refresh)) + (erc-status-sidebar-refresh) (with-current-buffer "*ERC Status*" (and (marker-position erc-status-sidebar--active-marker) (goto-char erc-status-sidebar--active-marker) diff --git a/test/lisp/erc/resources/sasl/plain-failed.eld b/test/lisp/erc/resources/sasl/plain-failed.eld index 336700290c5..47d13de18e5 100644 --- a/test/lisp/erc/resources/sasl/plain-failed.eld +++ b/test/lisp/erc/resources/sasl/plain-failed.eld @@ -1,16 +1,16 @@ ;; -*- mode: lisp-data; -*- ((cap-req 10 "CAP REQ :sasl")) -((nick 1 "NICK tester")) -((user 1 "USER tester 0 * :tester") +((nick 10 "NICK tester")) +((user 10 "USER tester 0 * :tester") (0.0 ":irc.foonet.org NOTICE * :*** Looking up your hostname...") (0.0 ":irc.foonet.org NOTICE * :*** Found your hostname") (0.0 ":irc.foonet.org CAP * ACK :cap-notify sasl")) -((authenticate-plain 3.2 "AUTHENTICATE PLAIN") +((authenticate-plain 10 "AUTHENTICATE PLAIN") (0.0 ":irc.foonet.org AUTHENTICATE +")) -((authenticate-gimme 3.2 "AUTHENTICATE AHRlc3RlcgB3cm9uZw==") +((authenticate-gimme 10 "AUTHENTICATE AHRlc3RlcgB3cm9uZw==") (0.0 ":irc.foonet.org 900 * * tester :You are now logged in as tester") (0.0 ":irc.foonet.org 904 * :SASL authentication failed: Invalid account credentials")) -((cap-end 3.2 "CAP END")) +((eof 10 EOF)) |