; Tag ERC multiline blanks test as :expensive

* test/lisp/erc/erc-tests.el
(erc--check-prompt-input-for-multiline-blanks): Move message-capturing
business outside of primary fixture.  Extend subprocess sleep duration
to 5m.  Delete some unreachable code.  (Bug#72004)
This commit is contained in:
F. Jason Park 2024-07-10 15:36:38 -07:00
parent 945335fec1
commit ef3f26ec02

View file

@ -1635,9 +1635,11 @@
'("Stripping" "Padding")) '("Stripping" "Padding"))
(ert-deftest erc--check-prompt-input-for-multiline-blanks () (ert-deftest erc--check-prompt-input-for-multiline-blanks ()
:tags '(:expensive-test)
(ert-with-message-capture messages
(erc-tests-common-with-process-input-spy (erc-tests-common-with-process-input-spy
(lambda (next) (lambda (next)
(erc-tests-common-init-server-proc "sleep" "10") (erc-tests-common-init-server-proc "sleep" "300")
(should-not erc-send-whitespace-lines) (should-not erc-send-whitespace-lines)
(should erc-warn-about-blank-lines) (should erc-warn-about-blank-lines)
@ -1653,7 +1655,7 @@
(insert input) (insert input)
(ert-info ((format "Opts: %S, Input: %S, want: %S" (ert-info ((format "Opts: %S, Input: %S, want: %S"
(list wb sw) input (car ex))) (list wb sw) input (car ex)))
(ert-with-message-capture messages (setq messages "")
(pcase-exhaustive (pop ex) (pcase-exhaustive (pop ex)
('err (let ((e (should-error (erc-send-current-line)))) ('err (let ((e (should-error (erc-send-current-line))))
(should (string-match (rx (| "trailing" "blank")) (should (string-match (rx (| "trailing" "blank"))
@ -1663,9 +1665,6 @@
('nop (erc-send-current-line) ('nop (erc-send-current-line)
(should (equal (erc-user-input) input)) (should (equal (erc-user-input) input))
(should-not (funcall next))) (should-not (funcall next)))
('clr (erc-send-current-line)
(should (string-empty-p (erc-user-input)))
(should-not (funcall next)))
((and (pred consp) v) ((and (pred consp) v)
(erc-send-current-line) (erc-send-current-line)
(should (string-empty-p (erc-user-input))) (should (string-empty-p (erc-user-input)))
@ -1679,8 +1678,8 @@
('s (should (equal " \n" (car (funcall next))))) ('s (should (equal " \n" (car (funcall next)))))
('a (should (equal "a\n" (car (funcall next))))) ('a (should (equal "a\n" (car (funcall next)))))
('b (should (equal "b\n" (car (funcall next))))))) ('b (should (equal "b\n" (car (funcall next)))))))
(should-not (funcall next)))))) (should-not (funcall next)))))
(delete-region erc-input-marker (point-max)))))))) (delete-region erc-input-marker (point-max)))))))))
(ert-deftest erc--check-prompt-input-for-multiline-blanks/explanations () (ert-deftest erc--check-prompt-input-for-multiline-blanks/explanations ()
(should erc-warn-about-blank-lines) (should erc-warn-about-blank-lines)