Tree [2ed3da] master v0.5.0 /
 History

HTTPS access


File Date Author Commit
 inst 2016-11-14 Colin B. Macdonald Colin B. Macdonald [2ed3da] [maint] bump version numbers for release
 src 2015-05-17 Oliver Heimlich Oliver Heimlich [cf48ef] src/Makefile: Removed 'clean' target and MKOCTF...
 test 2016-11-13 Colin B. Macdonald Colin B. Macdonald [7dd5c7] Fix test that used Octave-specific code
 util 2015-10-15 Colin B. Macdonald Colin B. Macdonald [10e740] matlab pkg: be less verbose in doc conversion s...
 .gitattributes 2015-05-24 Oliver Heimlich Oliver Heimlich [55033e] maint: Makefile: Implemented export of Octave p...
 .gitignore 2015-05-17 Oliver Heimlich Oliver Heimlich [86b12b] Makefile: Use on-demand oct-file compilation fo...
 .travis.yml 2016-08-08 Colin B. Macdonald Colin B. Macdonald [bc5e21] [maint] octave-unstable ppa not available on tr...
 CONTRIBUTORS 2015-05-17 Michael Walter Michael Walter [1e70eb] Update CONTRIBUTORS
 COPYING 2015-05-10 Colin B. Macdonald Colin B. Macdonald [9b1908] License: reformat/minor rewording to Modified B...
 DESCRIPTION 2016-11-14 Colin B. Macdonald Colin B. Macdonald [2ed3da] [maint] bump version numbers for release
 INDEX 2015-07-10 Michael Walter Michael Walter [a5239b] Added explicit INDEX file.
 Makefile 2015-09-27 Colin B. Macdonald Colin B. Macdonald [fee48b] convert texinfo into plaintext for matlab pkg
 NEWS 2016-11-14 Colin B. Macdonald Colin B. Macdonald [2ed3da] [maint] bump version numbers for release
 README.matlab.md 2015-05-12 Colin B. Macdonald Colin B. Macdonald [b2dfbc] Add Matlab-specific readme file
 README.md 2015-07-09 Michael Walter Michael Walter [5c449d] Update README.md
 octave-doctest.metainfo.xml 2016-02-05 Colin B. Macdonald Colin B. Macdonald [8318ea] [maint] use FSFAP for metainfo licensing

Read Me

Doctest Build Status

The Octave-Forge Doctest package finds specially-formatted blocks of example code within documentation files.
It then executes the code and confirms the output is correct.
This can be useful as part of a testing framework or simply to ensure that documentation stays up-to-date during software development.

To get started, here is a simple example:

function greeting = greet(user)
% Returns a greeting.
%
% >> greet World
%
% Hello, World!

greeting = ['Hello, ' user '!'];

end

We can test it by invoking doctest greet at the Octave prompt, which will give the following output:

greet .................................................. PASS    1/1

Summary:

   PASS    1/1

1/1 targets passed, 0 without tests.

Doctest also supports Texinfo markup, which is quite popular in the Octave world, and it provides various toggles and switches for customizing its behavior.
The Doctest documentation contains information on all this.
Quite appropriately, Doctest can test its own documentation.
We also maintain a list of software that is using Doctest.