From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id UBYxDjjFVGAqbQAA0tVLHw (envelope-from ) for ; Fri, 19 Mar 2021 15:37:28 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 0B3qCTjFVGBYZAAAbx9fmQ (envelope-from ) for ; Fri, 19 Mar 2021 15:37:28 +0000 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 7055E1D4DD for ; Fri, 19 Mar 2021 16:37:27 +0100 (CET) Received: from localhost ([::1]:34486 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNHBl-0001dU-Ej for larch@yhetil.org; Fri, 19 Mar 2021 11:37:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38994) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNHAp-0001bv-2u for emacs-orgmode@gnu.org; Fri, 19 Mar 2021 11:36:27 -0400 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]:37797) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lNHAm-0005mT-Fj for emacs-orgmode@gnu.org; Fri, 19 Mar 2021 11:36:26 -0400 Received: by mail-lj1-x235.google.com with SMTP id r20so12525007ljk.4 for ; Fri, 19 Mar 2021 08:36:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=DtyJKRR4LR4msCYt+hna2r7xF9JiIHgL0djRIfcQcSU=; b=AgcYxqrHCkJ7FbrXoGF5iLnoTeMVVgk5lhOaqOOwWJcDywWX4xrnP8gamlDnaAzkxz fySyHYOS1E6/hE1yp3MzIcXgtYuzENUU8nAv3rkd9p2winPY4HQlXhWnb7jwbLolNNyu YtXPDPmIwHqfXJ03fPDIbGnvepQATkyaiFinVv1VYIzxw6oZI/FUuogBqrnmUh98pBc0 ADDMsmUuUu/+voYCflNGcQII8B4o+X/kUmS8+SNWthO0eieyE8eYQhXrSJqzD3aM/DBw JqJN64ZOPQozwj6DO2EunLpgy5Aq0qxdf3UTyRHlZ38wCz+xfwndZCHAMQesypB0/jSu jlvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=DtyJKRR4LR4msCYt+hna2r7xF9JiIHgL0djRIfcQcSU=; b=I8bo8qEE7GbNxX7xRaksXRlDfsylCnrnRNzBTecLUPyLT2tYhau3QWqrm64uit5F+L kpmeKTAJfowYieEIYCPc3v/XedofMZ8rHy8+CE7RN+XCdaeOxtjTtFNH+eJBmU2y5xU6 33GCklSPlkfl/IMDxizWttSZGvf8UWhtzSFgeQ8Q/ebk6QJBkPDzkIzlBxFYfCg7Z3Zz uHw3KnoWFvBIT4I7hQiBccAZU+xHkzvoVlOlmp9OnT61smSFFoUImafmHVD0kW5Me5xB 3pJzLpt3k2+wZ41TXSP79sc9IfvBmToCFrKjhmNBl32cQjPbZqIFIC3k2NOT9mdEAw5j unlg== X-Gm-Message-State: AOAM531cIfOjs83IG2U3x7L/+GhdAZz14eTjsfcLUXKky5WNXPK4m8ci Wqx+PzRhc5ghHARTHIIbhms= X-Google-Smtp-Source: ABdhPJwafNlH+Lhk65rFIWlB5Y3PsA0gGt5kcZXfv1vCmYW+kpfbjhlrH4fzjFlbZHPhWVDWIvAjvw== X-Received: by 2002:a2e:1612:: with SMTP id w18mr1345938ljd.6.1616168182562; Fri, 19 Mar 2021 08:36:22 -0700 (PDT) Received: from localhost ([158.255.2.9]) by smtp.gmail.com with ESMTPSA id v20sm790041ljh.105.2021.03.19.08.36.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Mar 2021 08:36:22 -0700 (PDT) From: Ihor Radchenko To: Maxim Nikulin , emacs-orgmode@gnu.org Subject: Re: [PATCH] Re: Bug: Plain https links with brackets are not recognised [9.4.4 (release_9.4.4-625-g763c7a @ /home/yantar92/.emacs.d/straight/build/org/)] In-Reply-To: References: <87pn03g3rr.fsf@localhost> <87sg4zu47p.fsf@kyleam.com> <87k0qbk4rq.fsf@localhost> <87h7lfk4mz.fsf@localhost> <8735wvuvi3.fsf@localhost> Date: Fri, 19 Mar 2021 23:40:27 +0800 Message-ID: <877dm35ez8.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::235; envelope-from=yantar92@gmail.com; helo=mail-lj1-x235.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1616168247; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=DtyJKRR4LR4msCYt+hna2r7xF9JiIHgL0djRIfcQcSU=; b=QV1Bge2ysxxiIKDu3n/j+RbBSJYwrfiwxCWHC7eIaU3gv7OFFnv+WhX1/1qyXgLeYFETYv C8hxmQ/nqip3TZ4ZbhMnqDYG6m2UjzbH6+uSG/97WVbSdU+5duyZ1OLaZVRLlH2hX2BmWr 3TsRtKjhjcowphqRo751qZoInGMKZ/FlqVES0nczIDhwe3EqneBOhuKJ7Mf8nAMqVW6zxR vsvatrH/auldi4HXiJ1XixivoeY7LATrKRdhk1webM3/6KoNbBj0F+gMrm7WeS7khOruA3 9H6JF5bs9fKluG4pZsQQDNkVlQnFCoo3D4Zi8Hth8r5h9VQRZdkGBHqbf4yZCw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1616168247; a=rsa-sha256; cv=none; b=SIPmmW5w7PB0p0uhImYjp+DwyAFyuW/gZSq22aNJPTWK751/U6BRxjpOvZWWKqjNPzZ2ZJ R/y3TY+GYpai9ES1kYriJ7CwZ/9ECDVdMh88dpXpDZmf2YN5tzOu4EkbGaEnmag6iQDbw1 F9t/FzjlaPIUmRgzxKpKmPyac2rfotq7a4KGKcLezFQ58s3B8brXQ7WAfuObQ63neZapmA qNr8N0wZviA/2XA2sikR3QUSzMoFWAypWZQqnRq33XwX5njIpN8CzsAxo5J3JIJEt5kyco VoZ8DCxtg2I2QQUD4QMqd6MthChh6u8s1I82+YDZxvE5rxkXsEG8PQQIwgb7Gw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=AgcYxqrH; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -2.61 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=AgcYxqrH; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 7055E1D4DD X-Spam-Score: -2.61 X-Migadu-Scanner: scn0.migadu.com X-TUID: xk6ydXDfOYNr Maxim Nikulin writes: > To be clear, I do not ask for any changes. It is great to have some > tests even in the current form. I just have never tried ert before, so I > have some questions. Note that I have no experience with tests since I never did programming professionally. I wrote the tests in the patch simply by looking at other examples in the file. > Am I right that just one failure will be reported if a change in the > regexp causes problems with several test inputs? I am afraid, it is > rather inconvenient since this tests are rather for quality of > heuristics than exact requirements. To find proper balance of accuracy > and speed/regexp complexity, it is better to have all failures at once. > I am looking up for a feature like EXPECT_EQ (delayed failure) in > addition to strict ASSERT_EQ in googletest or at least like > TestCase.subTest in puthon unittest. For this particular case even > parametrized tests are enough (googletest, pytest). I cannot find anything like delayed failure in the info node for ERT and in the source code. There are should, should-not, should-error, and skip-unless asserts. > I have tried implement something similar to illustrate my expectations. > I think, for experienced lisp programmers the code looks ugly Using a macro is certainly more efficient than my copy-paste in the patch :) Though you may probably use more backquoting (see Backquote in Elisp manual) when writing macros. That would look more readable. > I do not know if it is possible to implement "might" (in addition to > "should") that using restart or some other technique will prevent > immediate abandoning of the test but will mark whole test as failed at > the end. It is indeed possible and maybe even welcome in emacs-devel. > Actually I hope to get response that I am trying to reinvent a wheel and > org or emacs has an established way to write tests feeding the same > function with list of cases Well... Example from ERT info page: (ert-deftest ert-test-mismatch () (should (eql (cl-mismatch "" "") nil)) (should (eql (cl-mismatch "" "a") 0)) (should (eql (cl-mismatch "a" "a") nil)) (should (eql (cl-mismatch "ab" "a") 1)) (should (eql (cl-mismatch "Aa" "aA") 0)) (should (eql (cl-mismatch '(a b c) '(a b d)) 2))) > ... and to get all failures in a reasonably readable report. When running ert interactively, things should get a little more manageable. See Running Tests Interactively node of ERT manual. Hope it helps. Best, Ihor