From: Stefan Monnier Date: Fri, 26 May 2023 16:23:59 +0000 (-0400) Subject: package-tests.el: Add test for last change X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e77e986a9b7d735c0e39198c8b80a34a29005fc5;p=emacs.git package-tests.el: Add test for last change * test/lisp/emacs-lisp/package-tests.el (package-test-desc-from-buffer): Make sure the absence of the terminating comment does not matter. --- diff --git a/test/lisp/emacs-lisp/package-tests.el b/test/lisp/emacs-lisp/package-tests.el index 0016fb586b7..113b4ec12a8 100644 --- a/test/lisp/emacs-lisp/package-tests.el +++ b/test/lisp/emacs-lisp/package-tests.el @@ -219,9 +219,14 @@ Must called from within a `tar-mode' buffer." (ert-deftest package-test-desc-from-buffer () "Parse an elisp buffer to get a `package-desc' object." - (with-package-test (:basedir (ert-resource-directory) :file "simple-single-1.3.el") - (should (package-test--compatible-p - (package-buffer-info) simple-single-desc 'kind))) + (with-package-test (:basedir (ert-resource-directory) + :file "simple-single-1.3.el") + (let ((pi (package-buffer-info))) + (should (package-test--compatible-p pi simple-single-desc 'kind)) + ;; The terminating line is not mandatory any more. + (re-search-forward "^;;; .* ends here") + (delete-region (match-beginning 0) (point-max)) + (should (equal (package-buffer-info) pi)))) (with-package-test (:basedir (ert-resource-directory) :file "simple-depend-1.0.el") (should (package-test--compatible-p (package-buffer-info) simple-depend-desc 'kind)))