From 9793a4616833a26157b4c60278ec17a9be233d8f Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 22 Feb 2018 16:59:30 -0500 Subject: [PATCH] * 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. --- test/lisp/emacs-lisp/package-tests.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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) -- 2.39.2