public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: <denis.maier-NSENcxR/0n0@public.gmane.org>
To: <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: AW: TDD for Lua filters
Date: Mon, 20 Jun 2022 09:01:15 +0000	[thread overview]
Message-ID: <24ebd7f15f2c49828d138e404924b589@unibe.ch> (raw)
In-Reply-To: <105db0c3-2956-4915-ba6a-dc3048b324c7n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2546 bytes --]

Thanks for the hints. I will have a look. Shelltestrunner looks quite interesting, but a simple makefile as described by Bastien might be already enough. (At least, this is also what seems to be used in the pandoc-lua-filters repo...)

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<https://github.com/simonmichael/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 be easy to use any other text-based 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 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 invoked once for every test case.

On Friday, June 17, 2022 at 11:19:15 PM UTC+2 denis...-NSENcxR/0n0@public.gmane.org<mailto:denis...-NSENcxR/0n0@public.gmane.org> wrote:
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 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 email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto: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<https://groups.google.com/d/msgid/pandoc-discuss/105db0c3-2956-4915-ba6a-dc3048b324c7n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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 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.

[-- Attachment #2: Type: text/html, Size: 5880 bytes --]

  parent reply	other threads:[~2022-06-20  9:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AQHYgo+TK9VdmT6SQ0qqtZh51kr5pA==>
2022-06-17 21:19 ` denis.maier-NSENcxR/0n0
     [not found]   ` <e60c5df6203a41b8862f7a360b479ea8-NSENcxR/0n0@public.gmane.org>
2022-06-17 22:08     ` Bastien DUMONT
2022-06-18 14:52     ` jcr
     [not found]       ` <105db0c3-2956-4915-ba6a-dc3048b324c7n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-06-20  9:01         ` denis.maier-NSENcxR/0n0 [this message]
     [not found]           ` <24ebd7f15f2c49828d138e404924b589-NSENcxR/0n0@public.gmane.org>
2022-06-20  9:24             ` AW: " Bastien DUMONT

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=24ebd7f15f2c49828d138e404924b589@unibe.ch \
    --to=denis.maier-nsencxr/0n0@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).