Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

TAP based testing for gforth

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 t
Octocat-spinner-32 .gitignore
Octocat-spinner-32 CHANGES
Octocat-spinner-32 LICENCE
Octocat-spinner-32 Makefile
Octocat-spinner-32 README
README
The Test Anything Protocol [1] is a simple protocol for expressing
the results of unit tests. This is a gforth implementation of a
TAP producer.

Currently I'm using it with Perl's prove command. Given a test script
like this:

    #! /usr/local/bin/gforth

    require ../lib/test-more.fs

    2 plan

    diag" Testing\n"

    \ Test dup. Probably works.

    {sp

    1 dup =ok" dup works" ?sp

    }sp

    bye

And assuming a recent version of Perl is installed you can:

    $ prove t/dup.fs

and get results like this:

    t/dup....# Testing
    t/dup....ok                                                                  
    All tests successful.
    Files=1, Tests=2,  0 wallclock secs ( 0.01 cusr +  0.02 csys =  0.03 CPU)

or to see individual results:

    $ prove -v t/dup.fs
    t/dup....# Testing
    1..2
    ok 1 dup works
    ok 2 stack balanced
    ok
    All tests successful.
    Files=1, Tests=2,  0 wallclock secs ( 0.01 cusr +  0.02 csys =  0.03 CPU)

This release should be considered alpha. If you find it useful please let me know.

[1] http://testanything.org/
Something went wrong with that request. Please try again.