NAME

Test::Count - Module for keeping track of the number of tests in a Test Script.

SYNOPSIS

$ cat "t/mytest.t" | perl -MTest::Count::Filter -e 'filter()'

DESCRIPTION

Test::Count is a set of perl modules for keeping track of the number of tests in a test file. It works by putting in comments of the form # TEST (one test), # TEST*$EXPR or # TEST+$EXPR (both are multiple tests). Test::Count count these tests throughout the fileand return all of their results.

One can put any mathematical expressions (using parentheses, +, -, *, / and % there). Also one can assign variables using # TEST:$myvar=5+6;$second_var=$myvar+3 and later use them in the add to count expressions.

One can find example test scripts under t/.

A simple Vim (http://www.vim.org/) function to update the count of the tests in the file is:

function! Perl_Tests_Count()
    %!perl -MTest::Count::Filter -e 'Test::Count::Filter->new({})->process()'
endfunction

FUNCTIONS

$counter->process({ 'input_fh' => \*MYFILEHANDLE});

Process the filehandle specified in 'input_fh', and return a hash ref with the following keys:

  • tests_count

    The count of the test.

  • lines

    The lines of the stream as is.

AUTHOR

Shlomi Fish, <shlomif at cpan.org>

BUGS

Please report any bugs or feature requests to bug-test-count at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test::Count. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Test::Count

You can also look for information at:

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2006 Shlomi Fish, all rights reserved.

This program is released under the following license: MIT X11.