Great! This would be very useful. Can you point me to how such doctests are run in Base. I'll have a look at extracting the functionality.
On Wednesday, January 6, 2016 at 1:27:47 AM UTC-7, andy hayden wrote: > > In Base it's done (in the function's docstring) with fenced code blocks > with jldoctest language: > > ```jldoctest > julia> code goes here > output here > ``` > > I don't think there's support yet outside on Base, but it's on at least > one roadmap (coming soon). > > On Saturday, 2 January 2016 02:48:23 UTC-8, John Travers wrote: >> >> Has the situation changed at all with all of the new documentation >> options last year? >> I would find a good equivalent of Python's doctests extremely useful in >> my code, and I guess it could make use of the documentation strings >> functionality in 0.4? >> >> On Saturday, June 28, 2014 at 3:51:55 PM UTC+2, Ivar Nesje wrote: >>> >>> There is something in JuliaDoc >>> https://github.com/JuliaLang/JuliaDoc/blob/master/juliadoc/jldoctest.py. >>> It think it was intended to be used to ensure that the manual was kept up >>> to date when we changed how things was printed. >>> >>> Ivar >>> >>> kl. 12:46:18 UTC+2 lørdag 28. juni 2014 skrev Magnus Lie Hetland >>> følgende: >>>> >>>> Is there anything similar to Python's doctest ( >>>> https://docs.python.org/3/library/doctest.html) for Julia? (Couldn't >>>> find anything…) Probably not to hard to hack together for myself, but if >>>> it's out there, I'd rather not reinvent the wheel :-} >>>> >>>
