lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


2013/4/27 oliver <oliver.schoenborn@gmail.com>:
>>   [*]: Ahh, new idea: Unit testing using examples in the docstring ...
>
>
> You're probably being sarcastic since you are using the term "docstring",
> but if not, you might get some ideas from python's doctest module [1], which
> is rather mature.
>
> [1] http://en.wikipedia.org/wiki/Doctest

This should not be too hard to do in Lua, but does sit better with a format like

--[[---
...
]]

than with the current LDoc format. Still, not hard to teach LDoc to accept that
as an alternative.