From: Lars Ingebrigtsen Date: Wed, 27 Oct 2021 14:13:30 +0000 (+0200) Subject: Fix parsing of erts files X-Git-Tag: emacs-29.0.90~3671^2~384 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=713e19a60adde301e5d7edc79f92bbb1b25b71a8;p=emacs.git Fix parsing of erts files * lisp/emacs-lisp/ert.el (ert-test-erts-file): Fix progress through a test file (bug#51409). --- diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index 57655403c20..efc1825017b 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -2670,10 +2670,11 @@ TRANSFORM will be called to get from before to after." (insert-file-contents file) (let ((gen-specs (list (cons 'dummy t) (cons 'code transform)))) - ;; The start of the "before" part starts with a form feed and then - ;; the name of the test. + ;; Find the start of a test. (while (re-search-forward "^=-=\n" nil t) - (setq gen-specs (ert-test--erts-test gen-specs file)))))) + (setq gen-specs (ert-test--erts-test gen-specs file)) + ;; Search to the end of the test. + (re-search-forward "^=-=-=\n"))))) (defun ert-test--erts-test (gen-specs file) (let* ((file-buffer (current-buffer))