Did you know ... Search Documentation:
Packs (add-ons) for SWI-Prolog

Package "doctest"

Title:Doctests using PlDoc and PlUnit
Rating:Not rated. Create the first rating!
Latest version:1.2.0
SHA1 sum:d594e6bbaaea656e46087301c39f2956622e9467
Author:Sylvain Soliman <Sylvain.Soliman@inria.fr>
Home page:https://gitlab.inria.fr/soliman/doctest/
Download URL:https://soliman.gitlabpages.inria.fr/doctest/doctest-*.zip

Reviews

No reviews. Create the first review!.

Details by download location

VersionSHA1#DownloadsURL
1.0.389e2463ec0d35b0ef3f04b1dc1803c565dc2cf434https://gitlab.inria.fr/soliman/doctest/-/archive/1.0.3/doctest-1.0.3.zip
1.1.34e5f7b2b08b41e2cdd0eb3dffa49e0d8d342100d3https://soliman.gitlabpages.inria.fr/doctest/doctest-1.1.3.zip
1.1.59ee9c64ce3989879abef96ff833901f2c3e23f072https://soliman.gitlabpages.inria.fr/doctest/doctest-1.1.5.zip
1.1.6db6de8c2d1bf55c7978ba5de43da3f1aa16acd2a4https://soliman.gitlabpages.inria.fr/doctest/doctest-1.1.6.zip
1.1.89d373e69ef86a98a7a509d198920ab9d11f550f02https://soliman.gitlabpages.inria.fr/doctest/doctest-1.1.8.zip
1.1.91b77895cfbd1d3ecc8d8654a11ad11b4738dbd652https://soliman.gitlabpages.inria.fr/doctest/doctest-1.1.9.zip
1.2.0d594e6bbaaea656e46087301c39f2956622e94672https://soliman.gitlabpages.inria.fr/doctest/doctest-1.2.0.zip

Doctest

![Latest release](https://gitlab.inria.fr/soliman/doctest/-/releases) ![Build Status](https://gitlab.inria.fr/soliman/doctest/-/pipelines)

Features

Work in progress, use at your own risks.

Generate PlUnit tests from queries in the PlDoc documentation of your module.

Be careful, this uses (and will run) the queries only (identified by ?- ) and not the documented answers (it will instead identify all answers/errors/etc. thanks to the test_wizard library).

Install

swipl pack install doctest

Usage

?- use_module(library(doctest)).
?- run_doctests('input.pl', 'output.plt').

You can access this package's PlDoc at https://soliman.gitlabpages.inria.fr/doctest/doctest.html

Contents of pack "doctest"

Pack contains 9 files holding a total of 9.8K bytes.