Ticket #30 (assigned enhancement)

Opened 4 years ago

Last modified 16 months ago

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

Changed 4 years ago by mgalloy

  • status changed from new to assigned
  • milestone changed from IDLdoc 3.1 to IDLdoc 3.2

Changed 3 years ago by mgalloy

  • milestone changed from IDLdoc 3.2 to IDLdoc 3.3

Changed 16 months ago by mgalloy

  • version changed from 3.0 to 3.3
  • milestone changed from IDLdoc 3.3 to IDLdoc 3.4
Note: See TracTickets for help on using tickets.