testing/lisp/test-duplicates-detector.el: Fix Emacs 27 compatibility
* testing/lisp/test-duplicates-detector.el (test-duplicates-detector--find-duplicates): Do not use `while-let' that is not yet available in Emacs 27.
This commit is contained in:
parent
112f1c5fcd
commit
130382779b
|
@ -145,10 +145,11 @@ Duplicate forms will be written to
|
|||
(goto-char (point-min))
|
||||
(while (search-forward "(ert-deftest" nil t)
|
||||
(goto-char (match-beginning 0))
|
||||
(let (deftest test-name)
|
||||
(ignore-errors
|
||||
(while-let ((deftest (or (read (current-buffer)) t))
|
||||
((eq (car deftest) 'ert-deftest))
|
||||
(test-name (cadr deftest)))
|
||||
(while (setq deftest (read (current-buffer)))
|
||||
(setq test-name (cadr deftest))
|
||||
(when (eq (car deftest) 'ert-deftest)
|
||||
(if-let ((f (seq-find
|
||||
(lambda (x)
|
||||
(equal-including-properties
|
||||
|
@ -163,7 +164,7 @@ Duplicate forms will be written to
|
|||
(push (cons test-name (cadr f)) duplicate-tests)
|
||||
(push deftest found-deftests)
|
||||
(test-duplicates-detector--search-forms-recursively
|
||||
deftest (list file test-name)))))))))
|
||||
deftest (list file test-name)))))))))))
|
||||
(setq test-duplicates-detector-duplicate-forms
|
||||
(seq-filter
|
||||
#'cdr
|
||||
|
|
Loading…
Reference in New Issue