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: TDD for Lua filters
Date: Fri, 17 Jun 2022 22:08:11 +0000	[thread overview]
Message-ID: <Yqz7S/qegYB7yXAG@localhost> (raw)
In-Reply-To: <e60c5df6203a41b8862f7a360b479ea8-NSENcxR/0n0@public.gmane.org>

I tried to do this for the last filter I wrote. I wrote a separate file with my assert() functions and wrote a Makefile to concatenate it automatically with the filter file (removing the return instruction) and run it with pandoc. Except that I have to alternate between the main script and the temporary file when correcting bugs, I am rather satisfied with this setup. Here it is:
https://bastien-dumont.onmypc.net/git/bdumont/pandoc-lua-filters/src/branch/master/margin-notes

Le Friday 17 June 2022 à 09:19:08PM, denis.maier-NSENcxR/0n0@public.gmane.org a écrit :
> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/e60c5df6203a41b8862f7a360b479ea8%40unibe.ch.

-- 
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/Yqz7S/qegYB7yXAG%40localhost.


  parent reply	other threads:[~2022-06-17 22:08 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 [this message]
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

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=Yqz7S/qegYB7yXAG@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).