From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.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 EL5CFziPtGUNTAAAqHPOHw:P1 (envelope-from ) for ; Sat, 27 Jan 2024 06:06:00 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id EL5CFziPtGUNTAAAqHPOHw (envelope-from ) for ; Sat, 27 Jan 2024 06:06:00 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=maasIodE; 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=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1706331960; 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=77sM5tuf0PsOIpCe9JcE9Km+Rlax4C6DwRMr9c91BIU=; b=uAOXyQJFW6OhDvn0460EYgF0/5+Ke5144OaxJPjUrttHhoBibIq8p9YsTzIL96tp+UZvby 4NdeGDD6JaJEV7C5fW2LUTkfj6iS/JiSMJwnHrxm6VFbC+hY9yW2vfHQQXs5v/GoyyxeTn odYektegA9DspmIISM+ubfEdy/NmwRQVqypyZ9fN05LIECwRfYrAaTU0Wp9L+1OfORgkIx 3oguGZdNpOS8BQMqv6bx2GbEBknQt3D3FYrjuCzjGHfand9lgwefdp3VieLI0EwY0xeINe vz6jlVda1bk/5oBpu6l8Ld71sVw6gN/doo19Vo0c0RR5npooMrllt7N0gY/+VQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=maasIodE; 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=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1706331960; a=rsa-sha256; cv=none; b=mT8TC95z2plMbSU9dIerh5H+j9gI2Zdt6GVeCjMWKc2rHAXLA1/MUv5jEyQLhmH5x+5OVf YKq45snXAmS2woDIidzFg3OIL7j9EdoATpxAIhBw/bhUgmLhjO0ctBgneonfEhMEqHw4eD WKmbZiV5y6bODguqZiJhHc+TA07qwjAWP/VPK5OGWUNyYBLmzJDrtWy5f4X7/Q4isAwGh3 QDgRey+bZu1Bb9j20nZDVPjXF5iuLPONqBMpUDsIbp6GQThiDEwChiyIyYNrAf0oSR858t G+v96T7+E6UZ2VWJd3YmiFeGYsT1dYctAmAEErFZgE7uVj2/mts0IFfdToRDCA== 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 EAE1440D3D for ; Sat, 27 Jan 2024 06:05:59 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rTasU-0006Qp-9h; Sat, 27 Jan 2024 00:05:14 -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 1rTasP-0006QG-25 for emacs-orgmode@gnu.org; Sat, 27 Jan 2024 00:05:09 -0500 Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rTasN-0003aT-C0 for emacs-orgmode@gnu.org; Sat, 27 Jan 2024 00:05:08 -0500 Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2cf2a381b86so15411881fa.0 for ; Fri, 26 Jan 2024 21:05:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706331903; x=1706936703; darn=gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=77sM5tuf0PsOIpCe9JcE9Km+Rlax4C6DwRMr9c91BIU=; b=maasIodE1MQslb4QMNW+BBVvKEokgjj0iA49okPVonTBak11BMR0Q+apLiIdj+XpmB EJ9YDMywzNw0KEaFJf2iW4fXqVoGmHCJNeMiJJY2FS3V4slLAZuo/ajbvjHCo3Kb9Lev TV7T+vMpkGmnNtRn4/Nof19znCF7uoc+30d6LkGIcDFlI+CwTMQQB4ur1ZzTslskd8KZ DC6mqKKTw6OUXFG2DzjvGhvNEDid8WoH0Rx3ghHBTVi+ysswUyj6/kPBCl2Sssc3Riwd oQSBi+wBTXsi+untAV13czWjhBNEiDVcbIlBks97h4vgPRJOdS/ewILX3OgNREOoLtoB Afjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706331903; x=1706936703; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=77sM5tuf0PsOIpCe9JcE9Km+Rlax4C6DwRMr9c91BIU=; b=dHJrl7mmp6OqARsdEtugvWW5lln+yJFlhDUNRtaa7urCBgyYqA6dB2kC5E5/z1IHiP 0yXnkbTB1mhS4k3hFcFxJz4BAhvVXkvxix4T5bCgEcjZu4cGjeHnuPCPmBz1IT3oiVAp Iq5KPWnr3DCUgh93aiBBblQLO98efhtx/IhSq0hdmS2XJAwowE+XAmBd1jOqcLR335Gj u0Kb7G5cZ744arVDKwxL+IHtI4g3C6WDHKdEB3OnUN/05eT2yVL0OvoQpRJASmbVD/f8 rGSfk6ZkA6UGc/HQSHc8+FUHys+jrtU3UZ/EAwZkpKt08VHjjfr/YW23OMszqwtaZ35e J6Iw== X-Gm-Message-State: AOJu0YybNxAdfBjuP2wdgintQAMx0sUn0CaKDyfGOp7R7HQDywQeiNUc wq1dRkI+RlZvVDtYLob0PfgboEzMTQWAN7T6lKCQqNtVeb4A1pxt+jAH6Sw4 X-Google-Smtp-Source: AGHT+IGmZGYTU4aVcn5ZI5siDB2KA5noeqi5k0je7ZxZuO7MKFPyhTA69yzzr20FeA7W50R1mlJxDQ== X-Received: by 2002:a2e:855a:0:b0:2cc:9789:3d4c with SMTP id u26-20020a2e855a000000b002cc97893d4cmr446813ljj.37.1706331903129; Fri, 26 Jan 2024 21:05:03 -0800 (PST) Received: from sonyvaio ([95.46.137.120]) by smtp.gmail.com with ESMTPSA id e5-20020a2e9845000000b002cd5b233861sm330075ljj.60.2024.01.26.21.04.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 21:05:00 -0800 (PST) From: Ilya Chernyshov To: Ihor Radchenko Cc: emacs-orgmode Subject: Re: [PATCH] testing: Delete duplicate tests In-Reply-To: <871qa4fcs5.fsf@localhost> 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> Date: Sat, 27 Jan 2024 11:04:45 +0600 Message-ID: <874jeznz82.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::234; envelope-from=ichernyshovvv@gmail.com; helo=mail-lj1-x234.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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.96 X-Migadu-Queue-Id: EAE1440D3D X-Spam-Score: -9.96 X-Migadu-Scanner: mx11.migadu.com X-TUID: YzKpTq37135i --=-=-= Content-Type: text/plain 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? --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-test-duplicates-detector.el-Add-correct-prefix-to-th.patch >From 6eb03414ac4eb8b64160b24dc7fcb805bf782310 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Fri, 26 Jan 2024 14:21:55 +0100 Subject: [PATCH] test-duplicates-detector.el: Add correct prefix to the deftest, check if consp * testing/lisp/test-duplicates-detector.el (test-duplicates-detector--search-forms-recursively): * testing/lisp/test-duplicates-detector.el (test-org-tests/test-duplicates-detector-testing-find-duplicates): Add correct prefix so that the test could be executed --- testing/lisp/test-duplicates-detector.el | 25 ++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/testing/lisp/test-duplicates-detector.el b/testing/lisp/test-duplicates-detector.el index d6f8aca5a..aed8034ee 100644 --- a/testing/lisp/test-duplicates-detector.el +++ b/testing/lisp/test-duplicates-detector.el @@ -231,22 +231,23 @@ FORM-PATH is list of the form: Write each form to `test-duplicates-detector-forms'" (let ((idx 0)) (dolist (sub-form form) - (unless (memq (car-safe sub-form) test-duplicates-progn-forms) - (push idx (alist-get - sub-form - (alist-get form-path test-duplicates-detector-forms - nil nil #'equal) - nil nil #'equal-including-properties))) - (unless (memq (car-safe sub-form) - '(should-not should should-error)) - (test-duplicates-detector--search-forms-recursively - sub-form - (append form-path (list (cons (car sub-form) idx))))) + (when (consp sub-form) + (unless (memq (car-safe sub-form) test-duplicates-progn-forms) + (push idx (alist-get + sub-form + (alist-get form-path test-duplicates-detector-forms + nil nil #'equal) + nil nil #'equal-including-properties))) + (unless (memq (car-safe sub-form) + '(should-not should should-error)) + (test-duplicates-detector--search-forms-recursively + sub-form + (append form-path (list (cons (car-safe sub-form) idx)))))) (cl-incf idx)))) ;;;; Testing the detector itself -(ert-deftest test-duplicates-detector-testing-find-duplicates () +(ert-deftest test-org-tests/test-duplicates-detector-testing-find-duplicates () "Test `test-duplicates-detector--find-duplicates'." (should (equal -- 2.41.0 --=-=-=--