From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id EM7HMdOWP2bMVQEAe85BDQ:P1 (envelope-from ) for ; Sat, 11 May 2024 18:03:32 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id EM7HMdOWP2bMVQEAe85BDQ (envelope-from ) for ; Sat, 11 May 2024 18:03:31 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=CNbGb2Up; dmarc=pass (policy=none) header.from=gmail.com; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1715443411; a=rsa-sha256; cv=none; b=OR+fErsLhOs6NfcXAIz3knXHBVT9M9ivAFAi2Norz5lWgSProja3sQHKfIX65EeavdGkNn jXLVGNkhmNjwuV9IYWAt8uL1QX+V4f7X7fvr216ZAoCaTs/ysFqX9jcHzFyqafiK+vo4tV QPZdGro6u/aX1kF4bL2pvK2i0jpoYEtdz0WtOouBS+mBDF87HileVaniNCRz2XSE5DVxHh 56k1DSSLYnNlAZhVuLbRTiT+CjDmbKX+guGKewFh53TA5C582aAer3JKZm9yiof0wZXuf7 y1vsodzFrRNI6erXuLNaamqV9f+VlGVIX422iWPvbTKd3MgHUL7q1HICNqLWDw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=CNbGb2Up; dmarc=pass (policy=none) header.from=gmail.com; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1715443411; 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=SxSWvOwhI+I1N9BGj603d5rmu7/25a1+z7TQzZvTkdk=; b=bRYiEmVanZjKmm2tsMp/v/dTyI2R6KLkXpeIeJjv/csU5rR7trqQXRZBU01Bp78Mk7fCoP T+NKQQceAwBljjfOP3ezy33m2FVoe0dq2FdK/YtaL4i+hxvgopvxySQYRP4Bol2wzrz3M0 Z/O049GKPn8uSALzEmGVZwDc/7/4emu3E5hOz1ugZZNjo+XmsP2MdtjdTMeGc9fHChCrJ/ kpUbW0pOcF/5d5BYvYo18AVCyKeTpQeyQ4GvhEwIemstvgxb4z4gtop3lqUI87Y9Mk6HXL 0yCqpQRmPoUtF4esr7DxapGvEX1yAc63/pms3TsQZTGKeMWvRQjij/MoPIZ4QQ== 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 AAFC523B07 for ; Sat, 11 May 2024 18:03:31 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s5pBs-0005tn-HY; Sat, 11 May 2024 12:03:16 -0400 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 1s5pBo-0005tO-Tj for emacs-orgmode@gnu.org; Sat, 11 May 2024 12:03:13 -0400 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s5pBm-0000sB-D6 for emacs-orgmode@gnu.org; Sat, 11 May 2024 12:03:11 -0400 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-51f17ac14daso3528093e87.1 for ; Sat, 11 May 2024 09:03:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715443388; x=1716048188; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=SxSWvOwhI+I1N9BGj603d5rmu7/25a1+z7TQzZvTkdk=; b=CNbGb2UpMVvfe7NHo6fQiBtGEuBb8kX3ogX9DXPeflujWVeTjCqaQZcFVUolVCV4Cs qYpzOXmmQ/jBS+t1yZcJP3Kt2o5pv3qzhbORZxifP9Tm0XWyoDaJ4PLj910k8ASamuxz geUtCTaZpGvujQcz3FneUmGnyiB/fDwXZ/PCe7H4LiLe7yPx5/i/uaURbEbKYYXzdD/5 z+p2mqp3BlSbX1NumZrYiwg2yR+YBmbFEACBMyN/MESOs5ifgQ072nm0yiGPAzy6WoYT QLT7Pd5XTzEvQMzEJ5eeS8zHkgtw5fZm4WGNDntTDb3YyBQKdcuClNjWy0uNE6wvfjwY gHUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715443388; x=1716048188; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=SxSWvOwhI+I1N9BGj603d5rmu7/25a1+z7TQzZvTkdk=; b=b+9TUAVW2LbIyYjGy0GqVrOHvBd9kIc7dS23393+sWLLKkNgodFmDmGrcsKgn3V8HT ZxrAv0mlPpoPusVelE6KMNB4MXKgpcCG8bLnOe4a1ij2LtZc3Db616at0+LzmLC5CnFn 0wzESR42zJBWEzYV1t4PJX7FIRdGuXpoYpurtiqXx4JT7KVCyV5gbZd8KIc2aeAcBJiM 43UdvcuxC0cTY1FnAWeACQu6ur6O01bllNeiGWAaA+qpThy+ZOXXmhcQoNhBtIzOtK9L L+2Y0dynoiQytVR5qXkc6ClYCoKdK+6VJv63/EQ/BHarwz1PxlB2sCDr2DUExyNE78ct MCHA== X-Gm-Message-State: AOJu0YxSRV10HFsG1Cuz/5AAqSPi3AkZA+hNrYjMkopsUE81xE2wQw3d WlWZO+YEi8QLOTdew+PfoLghW5AVvMwnUjLxxfOuF24P6RDK/jpZWSZm7hll6s9aqX85elvjnFF mHoVvU3DRVOIFcKR6Pi1mqhMnQhc= X-Google-Smtp-Source: AGHT+IHRVAwBWsIUhLp3Vtln7KXgw3jml3TuzMXjmKR+sLtWPW6sCv1KzFyrRczxtNW6cHMki+PUZ4LU7IYqdFG7xec= X-Received: by 2002:a05:6512:308f:b0:51a:c21b:73fb with SMTP id 2adb3069b0e04-5221007498fmr4135142e87.44.1715443387446; Sat, 11 May 2024 09:03:07 -0700 (PDT) MIME-Version: 1.0 References: <87mspb6nf2.fsf@localhost> <87r0eleqi2.fsf@localhost> <87jzkdsksv.fsf@localhost> <87wmoc9yuc.fsf@localhost> <87ttjftany.fsf@localhost> <87a5l5ye2u.fsf@localhost> In-Reply-To: <87a5l5ye2u.fsf@localhost> From: Nafiz Islam Date: Sat, 11 May 2024 12:02:56 -0400 Message-ID: Subject: Re: [FR] Support headline as a function for file+headline target for org-capture-templates To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="000000000000bdc4fd06182fc9c2" Received-SPF: pass client-ip=2a00:1450:4864:20::135; envelope-from=nafiz.islam1001@gmail.com; helo=mail-lf1-x135.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, HTML_MESSAGE=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.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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: AAFC523B07 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -9.42 X-Spam-Score: -9.42 X-TUID: sZ6fiEojwxip --000000000000bdc4fd06182fc9c2 Content-Type: text/plain; charset="UTF-8" I see there are a lot of test cases for org-find-olp (which is the function I believe processes the outline path argument). testing/lisp/test-org.el 2861:(ert-deftest test-org/org-find-olp () 2862: "Test `org-find-olp' specifications." 2875: (should (org-find-olp '("Headline") t)) 2876: (should-error (org-find-olp '("Headline" "Test") t)) 2877: (should-error (org-find-olp '("Headlinealksjd") t)) 2878: (should (org-find-olp '("Headline" "headline2") t)) 2879: (should (org-find-olp '("Headline" "headline3") t)) 2880: (should (org-find-olp '("Headline" "headline3" "headline4") t)) 2881: (should-error (org-find-olp '("Headline" "headline5") t)) 2882: (should (org-find-olp '("Headline" "headline6") t)) 2883: (should (org-find-olp '("Headline" "headline7") t)) 2884: (should (org-find-olp '("Headline" "headline8") t)) How should I go about testing different parameter types such as function and symbol? --000000000000bdc4fd06182fc9c2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I see there are a lot of test cases = for org-find-olp (which is the function I believe processes the outline pat= h argument).

testing/lisp/test-org.el
2861:(ert= -deftest test-org/org-find-olp ()
2862: =C2=A0"Test `org-find-olp&#= 39; specifications."
2875: =C2=A0 =C2=A0(should (org-find-olp '= ("Headline") t))
2876: =C2=A0 =C2=A0(should-error (org-find-ol= p '("Headline" "Test") t))
2877: =C2=A0 =C2=A0(s= hould-error (org-find-olp '("Headlinealksjd") t))
2878: = =C2=A0 =C2=A0(should (org-find-olp '("Headline" "headlin= e2") t))
2879: =C2=A0 =C2=A0(should (org-find-olp '("Headl= ine" "headline3") t))
2880: =C2=A0 =C2=A0(should (org-fin= d-olp '("Headline" "headline3" "headline4"= ;) t))
2881: =C2=A0 =C2=A0(should-error (org-find-olp '("Headli= ne" "headline5") t))
2882: =C2=A0 =C2=A0(should (org-find= -olp '("Headline" "headline6") t))
2883: =C2=A0 = =C2=A0(should (org-find-olp '("Headline" "headline7"= ;) t))
2884: =C2=A0 =C2=A0(should (org-find-olp '("Headline&quo= t; "headline8") t))

How should I go abou= t testing different parameter types such as function and symbol?
--000000000000bdc4fd06182fc9c2--