From 316c36d2b388a81e43fabf392a75af85532f56ba Mon Sep 17 00:00:00 2001 Message-ID: <316c36d2b388a81e43fabf392a75af85532f56ba.1706703212.git.yantar92@posteo.net> From: Ihor Radchenko Date: Wed, 31 Jan 2024 13:11:31 +0100 Subject: [PATCH 1/3] testing/lisp/test-duplicates-detector.el: Fix recursion, add more ignored forms * testing/lisp/test-duplicates-detector.el (test-duplicates-detector--search-forms-recursively): Do not test for duplicates according to parent form, not current form. * testing/lisp/test-duplicates-detector.el (test-duplicates-progn-forms): Add more progn-like forms. --- testing/lisp/test-duplicates-detector.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/testing/lisp/test-duplicates-detector.el b/testing/lisp/test-duplicates-detector.el index aed8034ee..b23fbce1e 100644 --- a/testing/lisp/test-duplicates-detector.el +++ b/testing/lisp/test-duplicates-detector.el @@ -42,9 +42,10 @@ (require 'org-test "../testing/org-test") ;;;; Variables (defvar test-duplicates-progn-forms - '( progn + '( progn prog1 let dolist dotimes org-test-with-temp-text org-test-with-temp-text-in-file + org-test-at-id org-test-ignore-duplicate) "List of forms equivalent to `progn'. Immediate children inside these are not checked for duplicates.") @@ -232,7 +233,7 @@ (defun test-duplicates-detector--search-forms-recursively (form form-path) (let ((idx 0)) (dolist (sub-form form) (when (consp sub-form) - (unless (memq (car-safe sub-form) test-duplicates-progn-forms) + (unless (memq (car-safe form) test-duplicates-progn-forms) (push idx (alist-get sub-form (alist-get form-path test-duplicates-detector-forms -- 2.43.0