From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id mFSbHaw5umWOVQAA62LTzQ:P1 (envelope-from ) for ; Wed, 31 Jan 2024 13:14:36 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id mFSbHaw5umWOVQAA62LTzQ (envelope-from ) for ; Wed, 31 Jan 2024 13:14:36 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=eWcmvqiV; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1706703276; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=yTtz+43vZZtMmBpaYMxkm4OgHv14TftM4hPf6AocrYs=; b=ntayPp9MEoMxgJuF4/IjK+ehj4OixF+EwVOtLbe0fx9EyZ3Cg7tALxr4FiaF4SnFvGih17 1DJuSaCcOsGbQ/Fe097CfSV8BMbTDk+LzO7GqWFkoBV+Iq3sqjfoHmulnqMQXoB7ru3Hck CyRHWSqvH8AjK2aWYuXN5AOppeJntVWQWoxGbpo90jBnOY5NJuACPkH+0eVuPvfPw/eH10 Lbj79mhum2TDnFIJljR40LsxeRY2f18Hh2NcKSyrqQoGdqfu2PnsMR22aW7Uy/MoG5uFav 6RtLrQhVCsIrZoSOg1HP0vJq9q9d/n71HPGlEqckKsjB0LKrzjGorPhvuX1tUg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=eWcmvqiV; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1706703276; a=rsa-sha256; cv=none; b=Yd6L20FqdwFl8lnGv5CVw6MuSJ7c+BjN+/o6RwNDYmoKEOnY9zfQN5fPRyYY65HcuJ5Sfx 1HC1iE43DtKX/rRGxH93Bj0Dpn7pievVHHQV4dcP8awgRi+OR6xvOrXQqaIj1IK7o91McT 9o+dehb+qVBl8QmfncoR4tFFHcu5/HbpmMHt6EXKVtIct7xUy2MVRG1L7isTG/fHITZ+kJ zgpg/9XfOoy1UJ9ipFf5nSa4kCM8wcsfQ8Uh9CwbYwfjYuc59a+9iOi6zs+RuvMnlSNf8q nmpsZcF42tzgcmJuj9+qaasDEJaAXA8f/bm8/Q2xs6v0TUs0vWIQJUmWaXtRJg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3961B5C13C for ; Wed, 31 Jan 2024 13:14:36 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rV9TU-0004ci-OE; Wed, 31 Jan 2024 07:13:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rV9TS-0004cH-KY for emacs-orgmode@gnu.org; Wed, 31 Jan 2024 07:13:50 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rV9TP-00083D-Jl for emacs-orgmode@gnu.org; Wed, 31 Jan 2024 07:13:50 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id D8876240028 for ; Wed, 31 Jan 2024 13:13:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1706703223; bh=cQdjlkSSUZ8WEgIEaa0nxoX97EMNYUEKSQuP+VRfgv4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=eWcmvqiVlYL67l5ED810JQRxTzGYb9iow3jNc3oli1LkbxyVAUXsIfPaj0ZgqvXj/ CT9nENy+l1pvkp8tu8w7yK4s78rNI9k2BSaNHcmLAB5HTcB1WGJu16Z/A67g5/uA5y NDiNi9+MiPW3yHWot+rsXTNL6vbx7mhDoa7af4qE2e2PX6ksqXhF7aI6c68AuUVPPI ndfpcKUgWGke3Y/6XLuC+qVal2HP37D03O+v6J0KlK6/gsNEQJZ/oiip+fzY5Vl2o8 b1qgKUf0CyqRqddkY8lZ2VnAib2AhC/Lp2VUllggIg+QTaF2L8uNvJs9+JOq9u2JZk xs0nl+sBhPeyA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TQ1Cp50d1z6tvp; Wed, 31 Jan 2024 13:13:42 +0100 (CET) From: Ihor Radchenko To: Ilya Chernyshov Cc: emacs-orgmode Subject: Re: [PATCH] testing: Delete duplicate tests In-Reply-To: <874jeznz82.fsf@gmail.com> References: <87cz0xndem.fsf@gmail.com> <87cz0wyw9m.fsf@localhost> <87y1ilitzo.fsf@localhost> <87fs3zybvj.fsf@gmail.com> <875y4viv14.fsf@localhost> <878r78ftvs.fsf@localhost> <87sf5cr7na.fsf@gmail.com> <87il3tl7eb.fsf@localhost> <87il3kw91t.fsf@gmail.com> <871qa4fcs5.fsf@localhost> <874jeznz82.fsf@gmail.com> Date: Wed, 31 Jan 2024 12:17:14 +0000 Message-ID: <87wmrpu27p.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.88 X-Migadu-Queue-Id: 3961B5C13C X-Spam-Score: -9.88 X-Migadu-Scanner: mx11.migadu.com X-TUID: MRr9spJ1eHv9 --=-=-= Content-Type: text/plain Ilya Chernyshov writes: > Ihor Radchenko writes: > >> What about the attached amendment? >> It should simplify things significantly. > > Sorry, in my previous patch the test that checks the detector itself was not > even run in 'make test' because of incorrect test prefix. > > Your patch does not work as you expect. Could you please revise it? Sure. I erroneously checked car of sub-form when testing whether to ignore testing duplicates in children. See the attached series of patches to be applied on top the previous 3. Note that your `test-org-tests/test-duplicates-detector-testing-find-duplicates' does not look right. I had to adjust the `equal' condition in order to make it pass. May you please check if the return value of `test-duplicates-detector--find-duplicates' is what you intended? --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-testing-lisp-test-duplicates-detector.el-Fix-recursi.patch >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 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0002-ob-haskell-session-named-none-means-one-shot-session.patch >From 77ec5f6e3834253a3ba872140f32b148b1135887 Mon Sep 17 00:00:00 2001 Message-ID: <77ec5f6e3834253a3ba872140f32b148b1135887.1706703212.git.yantar92@posteo.net> In-Reply-To: <316c36d2b388a81e43fabf392a75af85532f56ba.1706703212.git.yantar92@posteo.net> References: <316c36d2b388a81e43fabf392a75af85532f56ba.1706703212.git.yantar92@posteo.net> From: Ihor Radchenko Date: Wed, 31 Jan 2024 13:12:49 +0100 Subject: [PATCH 2/3] ob-haskell/session-named-none-means-one-shot-sessions: Remove duplicate * testing/lisp/test-ob-haskell-ghci.el (ob-haskell/session-named-none-means-one-shot-sessions): Remove duplicate from the test. --- testing/lisp/test-ob-haskell-ghci.el | 2 -- 1 file changed, 2 deletions(-) diff --git a/testing/lisp/test-ob-haskell-ghci.el b/testing/lisp/test-ob-haskell-ghci.el index cbd5f6f9a..990addcd4 100644 --- a/testing/lisp/test-ob-haskell-ghci.el +++ b/testing/lisp/test-ob-haskell-ghci.el @@ -117,8 +117,6 @@ (ert-deftest ob-haskell/sessions-must-not-share-variables () (ert-deftest ob-haskell/session-named-none-means-one-shot-sessions () "When no session, use a new session. \"none\" is a special name that means `no session'." - (test-ob-haskell-ghci ":session none" "x=2" nil) - (should-not (equal 2 (test-ob-haskell-ghci ":session \"none\"" "x" nil))) (test-ob-haskell-ghci ":session none" "x=2" nil) (should-not (equal 2 (test-ob-haskell-ghci ":session \"none\"" "x" nil)))) -- 2.43.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0003-test-org-tests-test-duplicates-detector-testing-find.patch >From 1f1c576cf5934e1c590faa7b0cad488aa8ffb9eb Mon Sep 17 00:00:00 2001 Message-ID: <1f1c576cf5934e1c590faa7b0cad488aa8ffb9eb.1706703212.git.yantar92@posteo.net> In-Reply-To: <316c36d2b388a81e43fabf392a75af85532f56ba.1706703212.git.yantar92@posteo.net> References: <316c36d2b388a81e43fabf392a75af85532f56ba.1706703212.git.yantar92@posteo.net> From: Ihor Radchenko Date: Wed, 31 Jan 2024 13:13:11 +0100 Subject: [PATCH 3/3] test-org-tests/test-duplicates-detector-testing-find-duplicates: Fix test * testing/lisp/test-duplicates-detector.el (test-org-tests/test-duplicates-detector-testing-find-duplicates): Fix test condition. --- testing/lisp/test-duplicates-detector.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/testing/lisp/test-duplicates-detector.el b/testing/lisp/test-duplicates-detector.el index b23fbce1e..25293f185 100644 --- a/testing/lisp/test-duplicates-detector.el +++ b/testing/lisp/test-duplicates-detector.el @@ -254,13 +254,13 @@ (ert-deftest test-org-tests/test-duplicates-detector-testing-find-duplicates () (equal (test-duplicates-detector--find-duplicates (list test-duplicates-detector-file-path)) - `((((,test-duplicates-detector-file-path - test-org-tests/test-with-nested-duplicates) - ((let ((var "string")) (should (message "123 %s" var))) 6 4)) - ((,test-duplicates-detector-file-path - test-org-tests/test-with-duplicates-at-root) - ((should (message "123")) 6 4))) - ((test-org-tests/duplicate-test-2 . test-org-tests/duplicate-test-1)))))) + `(((,test-duplicates-detector-file-path + test-org-tests/test-with-nested-duplicates) + ((let ((var "string")) (should (message "123 %s" var))) 6 4)) + ((,test-duplicates-detector-file-path + test-org-tests/test-with-duplicates-at-root) + ((should (message "123")) 6 4)) + (test-org-tests/duplicate-test-2 . test-org-tests/duplicate-test-1))))) ;;;;; Tests with duplicate forms -- 2.43.0 --=-=-= Content-Type: text/plain -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at --=-=-=--