Build Status

NAME

Test::Flatten - subtest output to a flatten

SYNOPSIS

in t/foo.t

use Test::More;
use Test::Flatten;

subtest 'foo' => sub {
    pass 'OK';
};

subtest 'bar' => sub {
    pass 'ok';
    subtest 'baz' => sub {
        pass 'ok';
    };
};

done_testing;

run it

$ prove -lvc t/foo.t
t/foo.t .. 
# ------------------------------------------------------------------------------
# foo
# ------------------------------------------------------------------------------
ok 1 - ok
# ------------------------------------------------------------------------------
# bar
# ------------------------------------------------------------------------------
ok 2 - ok
# ------------------------------------------------------------------------------
# baz
# ------------------------------------------------------------------------------
ok 3 - ok
1..3
ok

oh, flatten!

DESCRIPTION

Test::Flatten is override Test::More::subtest.

The subtest I think there are some problems.

ok 1 - foo is end of subtest block.

total tests is 1

success...?

Yes, We can!!

FUNCTIONS

SUBTEST_FILTER

If you need, you can using SUBTEST_FILTER environment. This is just a *hack* to skip only blocks matched the block name by environment variable. SUBTEST_FILTER variable can use regexp

$ env SUBTEST_FILTER=foo prove -lvc t/bar.t
# SKIP: bar by SUBTEST_FILTER
# ------------------------------------------------------------------------------
# foo
# ------------------------------------------------------------------------------
ok 1 - passed
# SKIP: baz by SUBTEST_FILTER
1..1

AUTHOR

xaicron <xaicron {at} cpan.org>

COPYRIGHT

Copyright 2011 - xaicron

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Test::SharedFork