Ticket #30 (assigned enhancement)
Support for doctests
| Reported by: | mgalloy | Owned by: | mgalloy |
|---|---|---|---|
| Priority: | major | Milestone: | IDLdoc 3.4 |
| Component: | core | Version: | 3.3 |
| Keywords: | doctest | Cc: |
Description
Doctests are simple tests embedded in the documentation.
Inside a "tests" tag, any line that starts with "IDL> " would be executed and the output compared to the following line(s) that don't start with "IDL> ".
For example:
;+ ; Factorial function. ; ; :Tests: ; IDL> a = factorial(5) ; IDL> print, a ; 120 ;-
The commands in a single :Tests: tag should run in a single scope (so the a variable above is seen by the second command).
Change History
Note: See
TracTickets for help on using
tickets.
