From: Stefan Monnier Date: Thu, 22 Feb 2018 21:59:30 +0000 (-0500) Subject: * test/lisp/emacs-lisp/package-tests.el: Improve signature tests X-Git-Tag: emacs-27.0.90~5640 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9793a4616833a26157b4c60278ec17a9be233d8f;p=emacs.git * test/lisp/emacs-lisp/package-tests.el: Improve signature tests (package-test-signed): Don't rely on return value of 'package-install'. Make sure 'package-install' does indeed install the package. --- diff --git a/test/lisp/emacs-lisp/package-tests.el b/test/lisp/emacs-lisp/package-tests.el index 62fba58919f..83f52284889 100644 --- a/test/lisp/emacs-lisp/package-tests.el +++ b/test/lisp/emacs-lisp/package-tests.el @@ -484,14 +484,16 @@ Must called from within a `tar-mode' buffer." (package-import-keyring keyring) (package-refresh-contents) (let ((package-check-signature 'allow-unsigned)) - (should (package-install 'signed-good)) + (should (progn (package-install 'signed-good) 'noerror)) (should-error (package-install 'signed-bad))) + (package-delete (car (alist-get 'signed-good package-alist))) (let ((package-check-signature t)) - (should (package-install 'signed-good)) + (should (progn (package-install 'signed-good) 'noerror)) (should-error (package-install 'signed-bad))) + (package-delete (car (alist-get 'signed-good package-alist))) (let ((package-check-signature nil)) - (should (package-install 'signed-good)) - (should (package-install 'signed-bad))) + (should (progn (package-install 'signed-good) 'noerror)) + (should (progn (package-install 'signed-bad) 'noerror))) ;; Check if the installed package status is updated. (let ((buf (package-list-packages))) (package-menu-refresh)