Test::Pretty - Smile Precure!
use Test::Pretty;
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
Or just add following option to perl interpreter.
-MTest::Pretty
After this, you can get a following prerty output.
And this module outputs TAP when $ENV{HARNESS_ACTIVE} is true or under the win32.
Tokuhiro Matsuno <tokuhirom AAJKLFJEF@ GMAIL COM>
Some code was taken from Test::Name::FromLine, thanks cho45++
Acme::PrettyCure
Copyright (C) Tokuhiro Matsuno
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Test::Pretty, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Pretty
CPAN shell
perl -MCPAN -e shell install Test::Pretty
For more information on module installation, please visit the detailed CPAN module installation guide.