Repair package-tests failure

* test/lisp/emacs-lisp/package-tests.el (package-test-install-single):
"already installed" is now an error; adapt test.
This commit is contained in:
Mattias Engdegård 2025-12-22 12:11:37 +01:00
parent 655d277731
commit 10fdf48635

View file

@ -241,10 +241,7 @@ Must called from within a `tar-mode' buffer."
(package-initialize)
(should (package-installed-p 'simple-single))
;; Check if we properly report an "already installed".
(package-install 'simple-single)
(with-current-buffer "*Messages*"
(should (string-match "^[`']simple-single['] is already installed\n?\\'"
(buffer-string))))
(should-error (package-install 'simple-single) :type 'user-error)
(should (package-installed-p 'simple-single))
(let* ((simple-pkg-dir (file-name-as-directory
(expand-file-name