view release on metacpan or search on metacpan
t/Test/abeltje.pm view on Meta::CPAN
use parent 'Test::Builder::Module';
use Test::Builder::Module;
use Test::More;
use Test::Fatal qw( exception success dies_ok lives_ok );
use Test::Warnings qw( :all );
our @EXPORT = (
'abeltje_done_testing',
@Test::More::EXPORT,
@Test::Fatal::EXPORT_OK,
@Test::Warnings::EXPORT_OK
);
sub import_extra {
# use Test::Warnings 'warnings' interferes
t/Test/abeltje.pm view on Meta::CPAN
=head1 DESCRIPTION
Mostly nicked from other modules (like L<Modern::Perl>)...
This gives you L<Test::More>, L<Test::Fatal>, L<Test::Warnings> and also imports
for you: L<strict>, L<warnings>, the L<feature> with the C<:5.10> tag and L<lib>
with the C<t/lib> path.
=head2 abeltje_done_testing
view all matches for this distribution
view release on metacpan or search on metacpan
t/03-frozen.t view on Meta::CPAN
like exception(sub { Data::RadixTree::Shared->new_readonly(undef) }),
qr/required/, 'new_readonly requires a path';
done_testing;
# minimal exception helper (avoid a Test::Fatal dependency)
sub exception {
my $code = shift;
my $err;
{ local $@; eval { $code->(); 1 } or $err = $@; }
return $err;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Test/Fatal.pm view on Meta::CPAN
#line 1
use strict;
use warnings;
package Test::Fatal;
{
$Test::Fatal::VERSION = '0.008';
}
# ABSTRACT: incredibly simple helpers for testing code with exceptions
use Carp ();
inc/Test/Fatal.pm view on Meta::CPAN
return undef;
} catch {
return $_ if $_;
my $problem = defined $_ ? 'false' : 'undef';
Carp::confess("$problem exception caught by Test::Fatal::exception");
};
}
sub success (&;@) {
view all matches for this distribution
view release on metacpan or search on metacpan
author:
- 'Andrew Nelson <anelson at cpan.org>'
- 'Florian Ragwitz <rafl@debian.org>'
build_requires:
MIME::Base64: 0
Test::Fatal: 0
Test::Memory::Cycle: 0
Test::More: 0.89
Test::Warn: 0
configure_requires:
ExtUtils::MakeMaker: 6.30
view all matches for this distribution
view release on metacpan or search on metacpan
t/03-frozen.t view on Meta::CPAN
is $E->cardinality, 3002, 'intersect cardinality = |0..3000| + 1 shared array member';
}
done_testing;
# minimal exception helper (avoid a Test::Fatal dependency)
sub exception {
my $code = shift;
my $err;
{ local $@; eval { $code->(); 1 } or $err = $@; }
return $err;
view all matches for this distribution
view release on metacpan or search on metacpan
"script_files" => [],
"test_requires" => {
"File::Find" => 0,
"File::Temp" => 0,
"FindBin" => 0,
"Test::Fatal" => 0,
"Test::File::ShareDir" => 0,
"Test::More" => "0.98",
"parent" => 0
}
);
view all matches for this distribution
view release on metacpan or search on metacpan
CGI: '0'
Data::Dumper::Concise: '0'
File::Spec: '0'
IO::Handle: '0'
IPC::Open3: '0'
Test::Fatal: '0'
Test::More: '0'
perl: '5.006'
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 0
view all matches for this distribution
view release on metacpan or search on metacpan
t/09-frozen.t view on Meta::CPAN
like exception(sub { Data::SortedSet::Shared->new_readonly(undef) }),
qr/required/, 'new_readonly requires a path';
done_testing;
# minimal exception helper (avoid a Test::Fatal dependency)
sub exception {
my $code = shift;
my $err;
{ local $@; eval { $code->(); 1 } or $err = $@; }
return $err;
view all matches for this distribution
view release on metacpan or search on metacpan
t/21-frozen.t view on Meta::CPAN
like exception(sub { $gro->move_geo($geh, 0, 0, 0) }), qr/read-only/, 'move_geo on read-only geo view croaks';
}
done_testing;
# minimal exception helper (avoid a Test::Fatal dependency)
sub exception {
my $code = shift;
my $err;
{ local $@; eval { $code->(); 1 } or $err = $@; }
return $err;
view all matches for this distribution
view release on metacpan or search on metacpan
},
"requires" : {
"ExtUtils::MakeMaker" : "0",
"File::Spec" : "0",
"Sub::Exporter" : "0",
"Test::Fatal" : "0",
"Test::More" : "0.96",
"Try::Tiny" : "0",
"constant" : "0",
"lib" : "0",
"strict" : "0"
view all matches for this distribution
view release on metacpan or search on metacpan
}
},
"test" : {
"requires" : {
"Moose" : "1.16",
"Test::Fatal" : "0.003",
"Test::More" : "0.96",
"Test::Routine" : "0.004"
}
}
},
view all matches for this distribution
view release on metacpan or search on metacpan
"Redis" : "0",
"RedisDB" : "2.57",
"Test::CheckDeps" : "0.010",
"Test::Deep" : "0",
"Test::Exception" : "0",
"Test::Fatal" : "0",
"Test::MockModule" : "0.15",
"Test::MockObject" : "1.20161202",
"Test::MockTime" : "0",
"Test::More" : "0.96",
"Test::RedisServer" : "0.23",
view all matches for this distribution
view release on metacpan or search on metacpan
examples/roundtrip.pl view on Meta::CPAN
use warnings;
no indirect;
use Test::More;
use Test::Fatal;
use Future::AsyncAwait;
use Syntax::Keyword::Try;
use IO::Async::Loop;
use Database::Async;
view all matches for this distribution
view release on metacpan or search on metacpan
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use Test::Fatal;
use Database::Async::SQLite;
my $dbh = new_ok('Database::Async::SQLite' => [ ':memory:' ]);
is($dbh->filename, ':memory:', 'database filename was correct');
view all matches for this distribution
view release on metacpan or search on metacpan
"ExtUtils::MakeMaker" : "0",
"File::Spec" : "0",
"IO::Handle" : "0",
"IPC::Open3" : "0",
"Test::CheckDeps" : "0.010",
"Test::Fatal" : "0.010",
"Test::More" : "0.98",
"Test::Refcount" : "0.07"
}
}
},
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Test/Database/Migrator.pm view on Meta::CPAN
use File::Temp qw( tempdir );
use Database::Migrator::Types qw( ClassName Dir File Str );
use Log::Dispatch;
use Log::Dispatch::TestDiag;
use Path::Class qw( dir );
use Test::Fatal;
use Test::More 0.88;
use Moose;
has class => (
view all matches for this distribution
view release on metacpan or search on metacpan
"test_requires" => {
"File::Spec" => 0,
"IO::Handle" => 0,
"IPC::Open3" => 0,
"Pod::Coverage::TrustPod" => 0,
"Test::Fatal" => 0,
"Test::Kwalitee" => "1.21",
"Test::More" => 0,
"Test::Pod" => "1.41",
"Test::Pod::Coverage" => "1.08",
"Test::Tester" => "1.302111"
"File::Spec" => 0,
"IO::Handle" => 0,
"IPC::Open3" => 0,
"Module::Build" => "0.30",
"Pod::Coverage::TrustPod" => 0,
"Test::Fatal" => 0,
"Test::Kwalitee" => "1.21",
"Test::More" => 0,
"Test::Pod" => "1.41",
"Test::Pod::Coverage" => "1.08",
"Test::Tester" => "1.302111"
view all matches for this distribution
view release on metacpan or search on metacpan
"CPAN::Meta::Requirements" : "2.120900"
},
"requires" : {
"ExtUtils::MakeMaker" : "0",
"File::Spec::Functions" : "0",
"Test::Fatal" : "0",
"Test::More" : "0",
"Test::Most" : "0",
"Test::Time" : "0.07",
"version" : "0"
}
view all matches for this distribution
view release on metacpan or search on metacpan
"test_requires" => {
"File::Spec" => 0,
"IO::Handle" => 0,
"IPC::Open3" => 0,
"Pod::Coverage::TrustPod" => 0,
"Test::Fatal" => 0,
"Test::Kwalitee" => "1.21",
"Test::More" => 0,
"Test::Pod" => "1.41",
"Test::Pod::Coverage" => "1.08",
"Test::Tester" => "1.302111"
"File::Spec" => 0,
"IO::Handle" => 0,
"IPC::Open3" => 0,
"Module::Build" => "0.30",
"Pod::Coverage::TrustPod" => 0,
"Test::Fatal" => 0,
"Test::Kwalitee" => "1.21",
"Test::More" => 0,
"Test::Pod" => "1.41",
"Test::Pod::Coverage" => "1.08",
"Test::Tester" => "1.302111"
view all matches for this distribution
view release on metacpan or search on metacpan
t/Test/Class/Date/Holidays.pm view on Meta::CPAN
use strict;
use warnings;
use base qw(Test::Class);
use Test::More; # done_testing
use Test::Fatal qw(dies_ok);
use Env qw($TEST_VERBOSE $EXTENDED_TESTING $HOLIDAYS_EXTENDED_TESTING);
use Locale::Country; # all_country_codes
use Test::MockModule;
use English qw(-no_match_vars);
view all matches for this distribution
view release on metacpan or search on metacpan
"warnings" : "0"
}
},
"test" : {
"requires" : {
"Test::Fatal" : "0",
"Test::More" : "0.88"
}
}
},
"release_status" : "stable",
view all matches for this distribution
view release on metacpan or search on metacpan
"warnings" : "0"
}
},
"test" : {
"recommends" : {
"Test::Fatal" : "0"
}
}
},
"provides" : {
"DateTime::Event::Easter" : {
view all matches for this distribution
view release on metacpan or search on metacpan
t/05fatal.t view on Meta::CPAN
# -*- encoding: utf-8; indent-tabs-mode: nil -*-
#
# t/05fail.t - checking the error messages (using Test::Fatal)
# Test script for DateTime::Format::Baby
# Copyright (C) 2015, 2016, Rick Measham and Jean Forget
#
# This program is distributed under the same terms as Perl 5.16.3:
# GNU Public License version 1 or later and Perl Artistic License
t/05fatal.t view on Meta::CPAN
use warnings;
use Test::More;
use DateTime::Format::Baby;
BEGIN {
eval "use Test::Fatal qw(dies_ok)";
plan skip_all => "Test::Fatal needed"
if $@;
}
plan(tests => 7);
dies_ok { my $baby = DateTime::Format::Baby->new('en', format => '??') } "new fails when called with odd number of parameters";
view all matches for this distribution
view release on metacpan or search on metacpan
},
"requires" : {
"DateTime" : "0",
"ExtUtils::MakeMaker" : "0",
"File::Spec" : "0",
"Test::Fatal" : "0",
"Test::More" : "0.88",
"parent" : "0",
"perl" : "5.006"
}
},
view all matches for this distribution
view release on metacpan or search on metacpan
cpanfile.snapshot view on Meta::CPAN
Role::Tiny 1.003003
Role::Tiny::With 0
Scalar::Util 0
Storable 0
Sub::Quote 0
Test::Fatal 0
Test::More 0.96
Try::Tiny 0
XString 0
overload 0
parent 0
cpanfile.snapshot view on Meta::CPAN
Scalar::Util 0
perl 5.006
Test-Fatal-0.016
pathname: R/RJ/RJBS/Test-Fatal-0.016.tar.gz
provides:
Test::Fatal 0.016
requirements:
Carp 0
Exporter 5.57
ExtUtils::MakeMaker 0
Test::Builder 0
view all matches for this distribution
view release on metacpan or search on metacpan
inc/GenerateLocaleTests.pm view on Meta::CPAN
my $template = <<'EOF';
use strict;
use warnings;
use Test::More 0.96;
use Test::Fatal;
use DateTime::Format::Strptime;
use DateTime::Locale;
use DateTime;
view all matches for this distribution