(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)))