Test::Chunks 0.39 review

Download
by rbytes.net on

Test::Chunks is a Data Driven Testing Framework. NOTE - This module has been deprecated and replaced by Test::Base

License: Perl Artistic License
File size: 32K
Developer: Brian Ingerson
0 stars award from rbytes.net

Test::Chunks is a Data Driven Testing Framework.

NOTE - This module has been deprecated and replaced by Test::Base. This is basically just a renaming of the module. Test::Chunks was not the best name for this module. Please discontinue using Test::Chunks and switch to Test::Base.
Helpful Hint: change all occurences of chunk to block in your test code, and everything should work exactly the same.

SYNOPSIS

use Test::Chunks;
use Pod::Simple;

delimiters qw(=== +++);
plan tests => 1 * chunks;

for my $chunk (chunks) {
# Note that this code is conceptual only. Pod::Simple is not so
# simple as to provide a simple pod_to_html function.
is(
Pod::Simple::pod_to_html($chunk->pod),
$chunk->text,
$chunk->name,
);
}

__END__

=== Header 1 Test

This is an optional description
of this particular test.

+++ pod
=head1 The Main Event
+++ html
< h1 >The Main Event< /h1 >


=== List Test
+++ pod
=over
=item * one
=item * two
=back

+++ html
< ul >
< li >one< /li >
< li >two< /li >
< /ul >

There are many testing situations where you have a set of inputs and a set of expected outputs and you want to make sure your process turns each input chunk into the corresponding output chunk. Test::Chunks allows you do this with a minimal amount of code.

Requirements:
Perl

Test::Chunks 0.39 search tags