public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Bastien DUMONT <bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: AW: TDD for Lua filters
Date: Mon, 20 Jun 2022 09:24:12 +0000	[thread overview]
Message-ID: <YrA8vJ6imlkuUHf3@localhost> (raw)
In-Reply-To: <24ebd7f15f2c49828d138e404924b589-NSENcxR/0n0@public.gmane.org>

Actually it is a bit different, since I test the functions individually. For the whole filter, I only have a sample file that does not cover all possible cases.

Le Monday 20 June 2022 à 09:01:15AM, denis.maier-NSENcxR/0n0@public.gmane.org a écrit :
> 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 [1] 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 [2]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 [3]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit [4]https://groups.google.com/d/msgid/
> pandoc-discuss/105db0c3-2956-4915-ba6a-dc3048b324c7n%40googlegroups.com.
> 
> --
> 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/msgid/
> pandoc-discuss/24ebd7f15f2c49828d138e404924b589%40unibe.ch.
> 
> References:
> 
> [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-ba6a-dc3048b324c7n%40googlegroups.com?utm_medium=email&utm_source=footer
> [5] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [6] https://groups.google.com/d/msgid/pandoc-discuss/24ebd7f15f2c49828d138e404924b589%40unibe.ch?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/YrA8vJ6imlkuUHf3%40localhost.


      parent reply	other threads:[~2022-06-20  9:24 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         ` AW: " denis.maier-NSENcxR/0n0
     [not found]           ` <24ebd7f15f2c49828d138e404924b589-NSENcxR/0n0@public.gmane.org>
2022-06-20  9:24             ` Bastien DUMONT [this message]

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=YrA8vJ6imlkuUHf3@localhost \
    --to=bastien.dumont-vwifzpto/vqstnjn9+bgxg@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).