(should (cdr (erc-scenarios-common-buflist "127.0.0.1"))))
(when more (funcall more port))))
-;; XXX maybe remove: already covered many times over by other scenarios
-(ert-deftest erc-scenarios-base-reuse-buffers-server-buffers--enabled ()
- :tags '(:expensive-test)
- (with-suppressed-warnings ((obsolete erc-reuse-buffers))
- (should erc-reuse-buffers))
- (let ((erc-scenarios-common-dialog "base/reuse-buffers/server"))
- (erc-scenarios-common-with-cleanup
- ((dumb-server (erc-d-run "localhost" t 'foonet 'barnet))
- (port (process-contact dumb-server :service))
- erc-autojoin-channels-alist)
-
- (ert-info ("Connect to foonet")
- (with-current-buffer (erc :server "127.0.0.1"
- :port port
- :nick "tester"
- :password "foonet:changeme"
- :full-name "tester")
- (should (string= (buffer-name) (format "127.0.0.1:%d" port)))
- (erc-d-t-search-for 12 "marked as being away")))
-
- (ert-info ("Connect to barnet")
- (with-current-buffer (erc :server "127.0.0.1"
- :port port
- :nick "tester"
- :password "barnet:changeme"
- :full-name "tester")
- (should (string= (buffer-name) (format "127.0.0.1:%d" port)))
- (erc-d-t-search-for 45 "marked as being away")))
-
- (erc-d-t-wait-for 2 (get-buffer "foonet"))
- (erc-d-t-wait-for 2 (get-buffer "barnet"))
-
- (ert-info ("Server buffers are unique, no IP-based names")
- (should-not (eq (get-buffer "foonet") (get-buffer "barnet")))
- (should-not (erc-scenarios-common-buflist "127.0.0.1"))))))
-
;; FIXME no sense in running this twice (JOIN variant includes this)
(ert-deftest erc-scenarios-base-reuse-buffers-server-buffers--disabled ()
:tags '(:expensive-test)