Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 eg
Octocat-spinner-32 img
Octocat-spinner-32 lib
Octocat-spinner-32 t
Octocat-spinner-32 xt
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 Build.PL
Octocat-spinner-32 Changes
Octocat-spinner-32 LICENSE
Octocat-spinner-32 META.json
Octocat-spinner-32 README.md
Octocat-spinner-32 cpanfile
README.md

NAME

Test::Pretty - Smile Precure!

SYNOPSIS

use Test::Pretty;

DESCRIPTION

Test::Pretty is a prettifier for Test::More.

When you are writing a test case such as following:

use strict;
use warnings;
use utf8;
use Test::More;

subtest 'MessageFilter' => sub {
    my $filter = MessageFilter->new('foo');

    subtest 'should detect message with NG word' => sub {
        ok($filter->detect('hello from foo'));
    };
    subtest 'should not detect message without NG word' => sub {
        ok(!$filter->detect('hello world!'));
    };
};

done_testing;

This code outputs following result:

No, it's not readable. Test::Pretty makes this result to pretty.

You can enable Test::Pretty by

use Test::Pretty;

Or just add following option to perl interpreter.

-MTest::Pretty

After this, you can get a following pretty output.

And this module outputs TAP when $ENV{HARNESS_ACTIVE} is true or under the win32.

AUTHOR

Tokuhiro Matsuno

THANKS TO

Some code was taken from Test::Name::FromLine, thanks cho45++

SEE ALSO

Acme::PrettyCure

LICENSE

Copyright (C) Tokuhiro Matsuno

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

Something went wrong with that request. Please try again.