From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30764 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.text.pandoc Subject: AW: TDD for Lua filters Date: Mon, 20 Jun 2022 09:01:15 +0000 Message-ID: <24ebd7f15f2c49828d138e404924b589@unibe.ch> References: <105db0c3-2956-4915-ba6a-dc3048b324c7n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_000_24ebd7f15f2c49828d138e404924b589unibech_" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23628"; mail-complaints-to="usenet@ciao.gmane.io" To: Original-X-From: pandoc-discuss+bncBCZ27W53TUFBBYXOYCKQMGQEHN7TFJQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Jun 20 11:01:27 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lf1-f62.google.com ([209.85.167.62]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1o3DHj-0005zr-E3 for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 20 Jun 2022 11:01:27 +0200 Original-Received: by mail-lf1-f62.google.com with SMTP id u5-20020a056512128500b00479784f526csf5200450lfs.13 for ; Mon, 20 Jun 2022 02:01:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1655715687; cv=pass; d=google.com; s=arc-20160816; b=fLE9Sm1F1M6cYnyFuG6V0cDm3DowAyzBW/PEtl+hnotr5stbYkgD3Hhsz8dTbDFN12 y3hYC2E+p0I+7PpQ7wOZAX/TYA0Qe452BQKhvAKgTOiV/l0rHN1uO9v7l3T85rfxpEqU FM0oeJiiM5awx1mzJkweLrFh7a9Xgp0VTjfp9Z0bXUc9gY+tXyXsqXzK0+vTPXbOgu4X ajadYA0A7E3/jY+dH99BOwUbXvs8fa1Aid5BKgGA8uzqcYy74ibB4tSU8P7ECzKBXh9n zvexTAQlp+ggRN5/9Dltw5Qtpzp6zMymrj0fOsPIZB18kvrIIJqQD/EnTuEo1DqbbBhP 82Tw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:mime-version :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:to:from:sender :dkim-signature; bh=GmVt/2gRtNueJVAx5Hovu7YY8wIsxZbaXKe+8ue7ksU=; b=wphgqUX5PlexN3fxne8m24ZlY6ClbeAJr+sOSLlZyxfIO7LcBnOcwoS99PY0M+Gjm9 va1v03KKKxjhhUMldpxnIl6N6PhNuhaVujo335b1HUeC2jCUU1WJuIAJfl+bg8J4lWt3 9HLukVN6eEiJe99HKSlrOX+umMP7zx680YFUNfaBKhDIDAe5knhKo28IoovcpRm//5XB wKvEZ4Ed2BYk0yKzzW4K3YLtf5y/Ruv1Nkx6UI7If2UQzJNaQwmM5pG5+dA5He1C20wD yfM14qFH2xIvX5tf4Z26tOJWvK8ni/Cb8ypxeBCkA3bwGU8RgmbiQo91TPySXweg+bZS pHqg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of denis.maier-NSENcxR/0n0@public.gmane.org designates 130.92.0.84 as permitted sender) smtp.mailfrom=denis.maier-NSENcxR/0n0@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=unibe.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:subject:thread-topic:thread-index:date:message-id :references:in-reply-to:accept-language:content-language :mime-version:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=GmVt/2gRtNueJVAx5Hovu7YY8wIsxZbaXKe+8ue7ksU=; b=mR3iQFfUB5gv63jHibs9CbZmfkQu2BGrxktygJh7ae4mMdJ0I60Cbw64vu8JBE3Ofb EgSZcSLyRpM4n4hz7VrrBkfbKCb+EWSaxucK7sBfu4s1I6orprQlLmIPx0kwWvfehFNk 55cX78FvILcD7SFA3BuG6OtCL4gEJ67MgxBYklAozD7khsYo3K8mBzBYWAD+gFVrXeuJ GNgUelK9bSfpFKftUeYY8WnqHA+5jOyhmwvRwE+fRX6F6eCFzs7HZfY+RAXLO/Vrq0Mx WX0jOUclO87d3m51mD65OvG3SuUsdkGSFuQruF0zoKf6E5JNlSPUVjgHtgEKplzXYI8h 8LVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:subject:thread-topic:thread-index :date:message-id:references:in-reply-to:accept-language :content-language:mime-version:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=GmVt/2gRtNueJVAx5Hovu7YY8wIsxZbaXKe+8ue7ksU=; b=mSzyneRV36WbVG5siPSXgzNJUkIn9W7If6AaNsnLuh+VhGg0i3EJOQ+YtmHrYPeiQ1 5UnuA4icNFnArAEwcQFZEVl/VaAGGW0vvUDCZ7yEBOowHrpaxZejoZFUfwrRMMJRFbgL kvgF2h+4cXG9nJlmit/rLEHd7TQ0Dfbyrk7cN4mF2nRuwcofj+YkKpbgsEwLPtGX3iMB odl/IfN3zXgK5cRzUJWfEu6Rt7t7DY4v/eOXfzs9/slsFa1iP6i1JVcfb8W6rEfJA4lS ZxtgmzrsYmW3/mWorqI7qujC7ZOW0F5 Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AJIora+o/N//aQC8NRkyYiKLYFIh/64kH970rbI6MUo8CGIaMSO9JEvG VoSzE2OtpTA7CxwqG5o6lso= X-Google-Smtp-Source: AGRyM1vogrxaNv2E10YUTTz6xU9ATY20W2tT9IxnBgic3Tfh89SQ9I7S3B58tYc7dm7LdirDM3wfrg== X-Received: by 2002:a05:6512:33c4:b0:479:3862:d5ad with SMTP id d4-20020a05651233c400b004793862d5admr12526969lfg.155.1655715686915; Mon, 20 Jun 2022 02:01:26 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a2e:bf11:0:b0:24a:fdc1:7af4 with SMTP id c17-20020a2ebf11000000b0024afdc17af4ls1599130ljr.1.gmail; Mon, 20 Jun 2022 02:01:21 -0700 (PDT) X-Received: by 2002:a2e:a485:0:b0:25a:735c:9f41 with SMTP id h5-20020a2ea485000000b0025a735c9f41mr448414lji.389.1655715681793; Mon, 20 Jun 2022 02:01:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655715681; cv=none; d=google.com; s=arc-20160816; b=OlOUckgQmss+w2nhRcJtzzi2BaPF40Q3ZSPIQd58nErH/EkBAUx63fWmTVhIvBDvnY TqczK6eDWIaMEbx2Mx3k8Sp07bqmSnbaZ9KlzbvCRayREbOomS4lt5twxcQkdF4jaMfl O6nG3J9pLBXoUKNO0ycf1D18NY5klZJK69RB2Q0xgXjsIb0f5YJlxAhsVcMSIssWL1Pb w1wCoj/SeXc9p7lo/EUTs9TQq6uRWjvJrvTlLIQRKR/5uUPURx2v+Citbf/KoWGveV7g 9NMrp0gD6eV8Bnjw7DhSCXRcx6teF124WgfW/3BIdAnswEDXObYMCqfCPxoMVvbo4it6 siwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:content-language:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:subject:to :from; bh=q1ueD1cUKah2nUBjw6+lsvDfkFLNWLz/mh6k9PY31fo=; b=qOf7C48jpOYtwwP5jOgopI5FVTCxNSKdfyYw7AS0s/LawLvqRbph/nz4dcwI9F6bAc PSGpT6q+frGJ/8ukf8sYFaQYm4oUdvtlihem/8un2xelt5Fha1l1Hj3eNFsvzx21Edd3 HpIXpciMCqgFSNvMhU2zcLD216sdYxAFLG+FqZsVOGpEaqoNejjPzYCelyv1hV1a20rq ElyEMagn8AI44KmOhGSZhpwxKnUn+ao0aCN7eg3qRf/Nm4wJeSa/MEdaaSHaQJsljfFK 433eecJMCsFSMRwQY0TUA6vqqDs6iMIvSX0xoeqwWbn16jqES0slqVLqTO7x68KOiw1q Fb2w== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of denis.maier-NSENcxR/0n0@public.gmane.org designates 130.92.0.84 as permitted sender) smtp.mailfrom=denis.maier-NSENcxR/0n0@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=unibe.ch Original-Received: from mailhub-lb3.unibe.ch (mailhub-lb3.unibe.ch. [130.92.0.84]) by gmr-mx.google.com with ESMTPS id x13-20020a2ea7cd000000b0025a71229262si62596ljp.3.2022.06.20.02.01.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jun 2022 02:01:21 -0700 (PDT) Received-SPF: pass (google.com: domain of denis.maier-NSENcxR/0n0@public.gmane.org designates 130.92.0.84 as permitted sender) client-ip=130.92.0.84; X-Virus-Scanned: By University of Bern - MGW Original-Received: from mail.campus.unibe.ch (aai-edge-04.campus.unibe.ch [130.92.13.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailhub-lb3.unibe.ch (Postfix) with ESMTPS id 16F9F500090 for ; Mon, 20 Jun 2022 11:01:16 +0200 (CEST) Thread-Topic: TDD for Lua filters Thread-Index: AQHYgo+TK9VdmT6SQ0qqtZh51kr5pK1VH1aAgALjQXA= In-Reply-To: <105db0c3-2956-4915-ba6a-dc3048b324c7n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Accept-Language: de-CH, en-US Content-Language: de-DE x-originating-ip: [130.92.13.161] X-Original-Sender: denis.maier-NSENcxR/0n0@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of denis.maier-NSENcxR/0n0@public.gmane.org designates 130.92.0.84 as permitted sender) smtp.mailfrom=denis.maier-NSENcxR/0n0@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=unibe.ch Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:30764 Archived-At: --_000_24ebd7f15f2c49828d138e404924b589unibech_ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks for the hints. I will have a look. Shelltestrunner looks quite inter= esting, but a simple makefile as described by Bastien might be already enou= gh. (At least, this is also what seems to be used in the pandoc-lua-filters= repo...) Von: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Im A= uftrag von jcr Gesendet: Samstag, 18. Juni 2022 16:52 An: pandoc-discuss Betreff: Re: TDD for Lua filters I use shelltestrunner for = this: the input is a simple markdown document, the command runs pandoc with= the filter, and the output is the expected markdown. Of course, it would b= e easy to use any other text-based input or output format that pandoc suppo= rts. I also use this to test the CSL style I developed: I can supply a refe= rence to format in a YAML block in the input, and use `markdown-citations` = as the output format to check the formatted result. The only disadvantage is that testing is a bit slow, because pandoc is invo= ked once for every test case. On Friday, June 17, 2022 at 11:19:15 PM UTC+2 denis...-NSENcxR/0n0@public.gmane.org wrote: Hi Is there any way to use tests when developing Lua filters? Of course, you c= an just compare the document produced with the filter against the expected = output with diff or so, but maybe there's a better approach...? All the best, Denis -- You received this message because you are subscribed to the Google Groups "= pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org. To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/105db0c3-2956-4915-ba6a-dc3048b324c7n%40googlegroups.com. --=20 You received this message because you are subscribed to the Google Groups "= pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/24ebd7f15f2c49828d138e404924b589%40unibe.ch. --_000_24ebd7f15f2c49828d138e404924b589unibech_ Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Thanks fo= r the hints. I will have a look. Shelltestr= unner looks quite interesting, but a simple makefile as described by Bastie= n might be already enough. (At least, this is also w= hat seems to be used in the pandoc-lua-filters repo...)

&nbs= p;

Von: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im Auftrag von jcr
Gesendet: Samstag, 18. Juni 2022 16:52
An: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Betreff: Re: TDD for Lua filters

 

I use shelltestrunner for this: the input is a simple markdown document, the = command runs pandoc with the filter, and the output is the expected markdow= n. Of course, it would be easy to use any other text-base= d input or output format that pandoc supports. I also use this to test the = CSL style I developed: I can supply a reference to format in a YAML block i= n the input, and use `markdown-citations` as the output format to check the formatted result.

 

The only disadvantage is that t= esting is a bit slow, because pandoc is invoked once for every test case.

 

On Friday, June 17, 2022 at 11:= 19:15 PM UTC+2 denis...@u= nibe.ch wrote:

Hi
Is there any way to use tests when developing Lua filters? Of course, you c= an just compare the document produced with the filter against the expected = output with diff or so, but maybe there's a better approach...?

All the best,
Denis

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to
<= span lang=3D"FR-CH">pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<= /a>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/pandoc-discuss/105db0c3-2956-4915-ba= 6a-dc3048b324c7n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc= -discuss/24ebd7f15f2c49828d138e404924b589%40unibe.ch.
--_000_24ebd7f15f2c49828d138e404924b589unibech_--