]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't use obsolete function in package-tests.el
authorStefan Kangas <stefankangas@gmail.com>
Wed, 5 Feb 2020 12:22:56 +0000 (13:22 +0100)
committerStefan Kangas <stefankangas@gmail.com>
Wed, 5 Feb 2020 12:22:56 +0000 (13:22 +0100)
* test/lisp/emacs-lisp/package-tests.el
(package-test-update-archives, package-test-signed): Use
'revert-buffer' instead of obsolete 'package-menu-refresh'.

test/lisp/emacs-lisp/package-tests.el

index adf917aef46399beba2f0a770de57f405238a9e5..05770d6b58a74887f7c10854e1cdf7aacf7eec18 100644 (file)
@@ -450,7 +450,7 @@ Must called from within a `tar-mode' buffer."
   "Test updating package archives."
   (with-package-test ()
     (let ((buf (package-list-packages)))
-      (package-menu-refresh)
+      (revert-buffer)
       (search-forward-regexp "^ +simple-single")
       (package-menu-mark-install)
       (package-menu-execute)
@@ -458,7 +458,7 @@ Must called from within a `tar-mode' buffer."
       (let ((package-test-data-dir
              (expand-file-name "package-resources/newer-versions" package-test-file-dir)))
         (setq package-archives `(("gnu" . ,package-test-data-dir)))
-        (package-menu-refresh)
+        (revert-buffer)
 
         ;; New version should be available and old version should be installed
         (goto-char (point-min))
@@ -470,7 +470,7 @@ Must called from within a `tar-mode' buffer."
 
         (package-menu-mark-upgrades)
         (package-menu-execute)
-        (package-menu-refresh)
+        (revert-buffer)
         (should (package-installed-p 'simple-single '(1 4)))))))
 
 (ert-deftest package-test-update-archives-async ()
@@ -632,7 +632,7 @@ Must called from within a `tar-mode' buffer."
         (should (progn (package-install 'signed-bad) 'noerror)))
       ;; Check if the installed package status is updated.
       (let ((buf (package-list-packages)))
-       (package-menu-refresh)
+       (revert-buffer)
        (should (re-search-forward
                 "^\\s-+signed-good\\s-+\\(\\S-+\\)\\s-+\\(\\S-+\\)\\s-"
                 nil t))