From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30765 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bastien DUMONT Newsgroups: gmane.text.pandoc Subject: Re: AW: TDD for Lua filters Date: Mon, 20 Jun 2022 09:24:12 +0000 Message-ID: References: <105db0c3-2956-4915-ba6a-dc3048b324c7n@googlegroups.com> <24ebd7f15f2c49828d138e404924b589@unibe.ch> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20351"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDCINCES2QJRBPXZYCKQMGQE4FTMQVI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Jun 20 11:24:18 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ej1-f59.google.com ([209.85.218.59]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1o3Ddp-00056E-Sk for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 20 Jun 2022 11:24:17 +0200 Original-Received: by mail-ej1-f59.google.com with SMTP id t15-20020a1709066bcf00b0070dedeacb2csf3193005ejs.9 for ; Mon, 20 Jun 2022 02:24:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1655717057; cv=pass; d=google.com; s=arc-20160816; b=UcRFjq7WkkCgBMiHc8h4QC3Zv4HlY/DLIDnjvyZYK0EQVXsioffaW/3yEEEoXMdm6x qC0zhyL4YQ7mdQQd/USmyefdhIKnNlZIkNhRPJbnvgUjmEjBpkkh3UhNw9Ng50aKxKmB pTE0MNgj9PeEEa/jM+X7FxpYZE6BFZ2nYqQbj1D08EqhIfIyf94571ZSjupcIGE12jZ2 9tpBJVAlS+gDRrsE5BS3m9B5ospvoHxEkTWcFzf8aqMBVB0i/IzKDywhjhrvYZdqGNJm B0GJaalFvCXqyb8sL6ITkSpizfJ+eu7PZPFSAu4wRDQBxId2r24zxyXH6xkdQteTK3F/ 9avg== 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:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:sender:dkim-signature; bh=jlvknnPVlKzh8XTpNYpqepvco+3TgVqERovG9+xU56E=; b=qAo0pYLBpvwGPsGFfPBjmiPlfWPXwLN1ww5x7FEbJo2JislaK+DWwzma4/dtx7EVby g9WVHlob1sm1iU7iT8RiSiaLREiNZmXfmd7c1AW37iGsGPdyjpBVJeP4fajoHnh/uH7J CJjB3853Ze4NfTes4hPqLMJUdpVZOnBbZ8x2JOdHTHAfK1VuslEkxBCNilmm4GVtmX8b ET8ZV+C9vfXmey9Wq2l3lYcjR2zyavFuo8T19wrB9vlLD1FonR33BCcUALnhndNR9LAV yY4vc0jbpFt0sZb4WkYlcMi8MbK/WNcrkebA1yVm0HDxrhmxq0vqZ+AdQc6A2C/yV3Of eTcg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=BpbhGrI4; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:date:from:to:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :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=jlvknnPVlKzh8XTpNYpqepvco+3TgVqERovG9+xU56E=; b=kXtbaunVg6KbwrJ6fUufN5/h2sPpVvzu7qN0G3p1h3EZWdtBsYcjWE98JJ7BQRikZr djySt0TkWHGbf6fz0svouDqeMmma4THqVtcWE9jHkaQX6SU6akvBCRxH5Y3+2eELdPEn 5JPYJQr0DC5v3sTMShkt57azrghSSr+81rod9krjxQ/rtxx2NcvyasnoRkDC9boZM8fd zJKt66R7S0+FfHL4KZGItIektnyiQvs/A2RImzickVwV8dNCdMepXUy56zegOQrs11Oy k3DAa8907v7d/7hsZwKkjDg9aM1BMau1X2bnFWbg2ntVvztFU8lUjzEEf8QKggA0rtVx +Nog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:date:from:to:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to: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=jlvknnPVlKzh8XTpNYpqepvco+3TgVqERovG9+xU56E=; b=7g5kUk45Q4QG8IaI72rC53LAcRQL3l4kL/FEQYmMPqmk3a/ATSSIWx91aGFLud2wIF bsBhK5J7emiqetJ0gCa48W98RspHCBkFLyXiD261ogaWPuKv16NdfZty2ulOme4l4x2/ yYmRz/1YAeqCJiEjN0A/hDgyqF6xfoJVQfnB3w6SHaPSjYGmBNQfMAxgWPWadVe1hdI0 5IYT/uCZzOYdbNEzptzjvcD6kWm5y6ofo6zkdhfeKHG3ih4DW0nuJcuKJNzk3k/LESJo VZV65PTjzZm3tE4R7j8JjlrSc0GX7nu+zlHpvkCA4x2/ Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AJIora9qLDpvtWZ3ihPoAkFcSo2urPLk490PJMTRJqRzgMC9bpbVPNXh Tg6qPQnGIK2erxVCKuwxuf4= X-Google-Smtp-Source: AGRyM1vd70MKULLSr9cbYwADX5sk5EAxPzerhzwtxU9K+ELKPTBL3/Qa+1cTAAy8vvUG1WNHG274JA== X-Received: by 2002:a17:907:8a1f:b0:711:da32:8410 with SMTP id sc31-20020a1709078a1f00b00711da328410mr20891239ejc.298.1655717057493; Mon, 20 Jun 2022 02:24:17 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6402:709:b0:431:3a5e:75b3 with SMTP id w9-20020a056402070900b004313a5e75b3ls6277582edx.1.gmail; Mon, 20 Jun 2022 02:24:13 -0700 (PDT) X-Received: by 2002:a05:6402:51d3:b0:431:6c7b:28d with SMTP id r19-20020a05640251d300b004316c7b028dmr27498239edd.281.1655717053671; Mon, 20 Jun 2022 02:24:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655717053; cv=none; d=google.com; s=arc-20160816; b=mjxNs+o6LPanuM5zhNRS/x4IpGDzusKpdZl95cuNQ1pAQafwDNP8tKl44QeBezVu7T LGbmFq/P22v4gzV281UYdZi2OJ1BIIW0nrMmoHxWoANW8tNVFCERXAnHptRh+1GnSAe8 EKOtTtdUqCk0sMJZl+BwZNRoI6c7NwQWzfWnns3WGJDGBiiOa1lk1DDMnugVx6zCoo7m 0WsGKFEise7gkOK1WWh/sem9pygjlDBaSANSu62z2EoTFGjMIs4Hht+q10s1V3NS3CNN j6i5dv5+v1NYcI4lzSyfUqsoHNTsn2rYqhdU6hzJXCug4ztHLWZjhHaBPmg+bgYV67aD umeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:to:from:date :dkim-signature; bh=9/2F3zW3xz9z2uzCOx/N5G0DhgngOBCERqwUtymG+fY=; b=Lx0VJFp2G106vvxP5a2tP5hOad51UoVALWjUAThbudjOKf2yNSMVMCbuSj5FU97rm9 gCGqW0XBl6nJDuhp0xao0qT7R2+0tfFBzHA5KvvnjS+hsAqIhzgf00ZwfLDEzpZvvYEI 0dO9mzViF9BppaSvcEwOLJgn/4OXxgepKl43M5X1MDyV2hpoJ1/59L/HkmLDFGrvYW/c XwZxT9N4MyfpHUmuU/I6lgI9i2fyTXBLMjvrB7aRJinBcBrapSXk58funeNpLVpjDQlX 4e9GQedV8S4F3BCgipG2xGIpquX3kW+snLzdHgJSI4II0ZM94lp/GbnNtjmJ6mXcTXCY rQZg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=BpbhGrI4; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net Original-Received: from mout02.posteo.de (mout02.posteo.de. [185.67.36.66]) by gmr-mx.google.com with ESMTPS id el7-20020a056402360700b0042d687c85d2si460302edb.0.2022.06.20.02.24.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jun 2022 02:24:13 -0700 (PDT) Received-SPF: pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) client-ip=185.67.36.66; Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 40E78240109 for ; Mon, 20 Jun 2022 11:24:13 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4LRPNX6N9mz6tn0 for ; Mon, 20 Jun 2022 11:24:12 +0200 (CEST) Content-Disposition: inline In-Reply-To: <24ebd7f15f2c49828d138e404924b589-NSENcxR/0n0@public.gmane.org> X-Original-Sender: bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=BpbhGrI4; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net 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:30765 Archived-At: Actually it is a bit different, since I test the functions individually. Fo= r the whole filter, I only have a sample file that does not cover all possi= ble cases. Le Monday 20 June 2022 =C3=A0 09:01:15AM, denis.maier-NSENcxR/0n0@public.gmane.org a =C3=A9crit= : > Thanks for the hints. I will have a look. Shelltestrunner looks quite > interesting, but a simple makefile as described by Bastien might be alrea= dy > enough. (At least, this is also what seems to be used in the pandoc-lua-f= ilters > repo...) >=20 > =20 >=20 > Von: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Im > Auftrag von jcr > Gesendet: Samstag, 18. Juni 2022 16:52 > An: pandoc-discuss > Betreff: Re: TDD for Lua filters >=20 > =20 >=20 > I use [1] shelltestrunner for this: the input is a simple markdown docume= nt, > the command runs pandoc with the filter, and the output is the expected > markdown. Of course, it would be easy to use any other text-based input o= r > 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 in the inpu= t, and > use `markdown-citations` as the output format to check the formatted resu= lt. >=20 > =20 >=20 > The only disadvantage is that testing is a bit slow, because pandoc is in= voked > once for every test case. >=20 > =20 >=20 > On Friday, June 17, 2022 at 11:19:15 PM UTC+2 [2]denis...-NSENcxR/0n0@public.gmane.org wrote: >=20 > Hi > Is there any way to use tests when developing Lua filters? Of course,= you > can just compare the document produced with the filter against the ex= pected > output with diff or so, but maybe there's a better approach...? >=20 > All the best, > Denis >=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= email > to [3]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit [4]https://groups.google.com/d/m= sgid/ > 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= email > to [5]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit [6]https://groups.google.com/d/m= sgid/ > pandoc-discuss/24ebd7f15f2c49828d138e404924b589%40unibe.ch. >=20 > References: >=20 > [1] https://github.com/simonmichael/shelltestrunner > [2] mailto:denis...-NSENcxR/0n0@public.gmane.org > [3] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [4] https://groups.google.com/d/msgid/pandoc-discuss/105db0c3-2956-4915-b= a6a-dc3048b324c7n%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter > [5] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [6] https://groups.google.com/d/msgid/pandoc-discuss/24ebd7f15f2c49828d13= 8e404924b589%40unibe.ch?utm_medium=3Demail&utm_source=3Dfooter --=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/YrA8vJ6imlkuUHf3%40localhost.