Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make prove -br t work under perl 5.26+ #81

Merged
merged 1 commit into from
Nov 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion author/import-moose-test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ sub copy_as_mouse {
if($. == 2) {
say $out "# This is automatically generated by $0.";
say $out "# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!";
say $out 'use t::lib::MooseCompat;';
say $out 'use lib "t/lib";';
say $out 'use MooseCompat;';
}
s/ Class::MOP::([a-z_]+) /Mouse::Util::$1/xmsg;
s/ Class::MOP /Mouse::Meta/xmsg;
Expand Down
11 changes: 6 additions & 5 deletions t/001_mouse/805-class_type.t
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,20 @@ use Test::More tests => 4;
use Mouse;
use Mouse::Util::TypeConstraints;

require t::lib::ClassType_Foo;
use lib "t/lib";
require ClassType_Foo;

# XXX: This below API is different from that of Moose.
# class_type() should be class_type 'ClassName';
# class_type 'Headers' => { class => 't::lib::ClassType_Foo' };
# this should be subtype Headers => as 't::lib::ClassType_foo';
subtype 'Headers'
=> as 't::lib::ClassType_Foo'
=> as 'ClassType_Foo'
;

coerce 'Headers' =>
from 'HashRef' => via {
t::lib::ClassType_Foo->new(%{ $_ });
ClassType_Foo->new(%{ $_ });
},
;

Expand All @@ -30,8 +31,8 @@ use Test::More tests => 4;
}

my $res = Response->new(headers => { foo => 'bar' });
isa_ok($res->headers, 't::lib::ClassType_Foo');
isa_ok($res->headers, 'ClassType_Foo');
is($res->headers->foo, 'bar');
$res->headers({foo => 'yay'});
isa_ok($res->headers, 't::lib::ClassType_Foo');
isa_ok($res->headers, 'ClassType_Foo');
is($res->headers->foo, 'yay');
3 changes: 2 additions & 1 deletion t/020_attributes/002_attribute_writer_generation.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;

use strict;
use warnings;
Expand Down
3 changes: 2 additions & 1 deletion t/020_attributes/003_attribute_accessor_generation.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;

use strict;
use warnings;
Expand Down
3 changes: 2 additions & 1 deletion t/020_attributes/005_attribute_does.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;

use strict;
use warnings;
Expand Down
3 changes: 2 additions & 1 deletion t/020_attributes/006_attribute_required.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;

use strict;
use warnings;
Expand Down
3 changes: 2 additions & 1 deletion t/020_attributes/007_attribute_custom_metaclass.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;

use strict;
use warnings;
Expand Down
3 changes: 2 additions & 1 deletion t/020_attributes/008_attribute_type_unions.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;

use strict;
use warnings;
Expand Down
3 changes: 2 additions & 1 deletion t/020_attributes/009_attribute_inherited_slot_specs.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;

use strict;
use warnings;
Expand Down
3 changes: 2 additions & 1 deletion t/020_attributes/011_more_attr_delegation.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;

use strict;
use warnings;
Expand Down
3 changes: 2 additions & 1 deletion t/020_attributes/013_attr_dereference_test.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;

use strict;
use warnings;
Expand Down
3 changes: 2 additions & 1 deletion t/020_attributes/014_misc_attribute_coerce_lazy.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;

use strict;
use warnings;
Expand Down
3 changes: 2 additions & 1 deletion t/020_attributes/015_attribute_traits.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;

use strict;
use warnings;
Expand Down
3 changes: 2 additions & 1 deletion t/020_attributes/017_attribute_traits_n_meta.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;

use strict;
use warnings;
Expand Down
3 changes: 2 additions & 1 deletion t/020_attributes/018_no_init_arg.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;

use strict;
use warnings;
Expand Down
3 changes: 2 additions & 1 deletion t/020_attributes/020_trigger_and_coerce.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;

use strict;
use warnings;
Expand Down
3 changes: 2 additions & 1 deletion t/020_attributes/022_illegal_options_for_inheritance.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;

use strict;
use warnings;
Expand Down
3 changes: 2 additions & 1 deletion t/020_attributes/024_attribute_traits_parameterized.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/env perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;
use strict;
use warnings;
use Test::More;
Expand Down
3 changes: 2 additions & 1 deletion t/020_attributes/025_chained_coercion.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;

use strict;
use warnings;
Expand Down
3 changes: 2 additions & 1 deletion t/020_attributes/026_attribute_without_any_methods.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;

use strict;
use warnings;
Expand Down
3 changes: 2 additions & 1 deletion t/020_attributes/027_accessor_override_method.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/env perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;
use strict;
use warnings;
use Test::More;
Expand Down
3 changes: 2 additions & 1 deletion t/020_attributes/029_accessor_context.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;

use strict;
use warnings;
Expand Down
3 changes: 2 additions & 1 deletion t/020_attributes/030_non_alpha_attr_names.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use strict;
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;
use warnings;

use Test::More;
Expand Down
3 changes: 2 additions & 1 deletion t/020_attributes/031_delegation_and_modifiers.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;

use strict;
use warnings;
Expand Down
3 changes: 2 additions & 1 deletion t/020_attributes/032_delegation_arg_aliasing.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/env perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;
use strict;
use warnings;
use Test::More;
Expand Down
3 changes: 2 additions & 1 deletion t/020_attributes/034_numeric_defaults.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/env perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;
use strict;
use warnings;
use Test::More;
Expand Down
3 changes: 2 additions & 1 deletion t/020_attributes/035_default_undef.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/env perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;
use strict;
use warnings;
use Test::More;
Expand Down
3 changes: 2 additions & 1 deletion t/030_roles/020_role_composite.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;

use strict;
use warnings;
Expand Down
3 changes: 2 additions & 1 deletion t/040_type_constraints/002_util_type_constraints_export.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;

use strict;
use warnings;
Expand Down
3 changes: 2 additions & 1 deletion t/040_type_constraints/003_util_std_type_constraints.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;

use strict;
use warnings;
Expand Down
3 changes: 2 additions & 1 deletion t/040_type_constraints/004_util_find_type_constraint.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;

use strict;
use warnings;
Expand Down
5 changes: 2 additions & 3 deletions t/040_type_constraints/006_util_type_reloading.t
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#!/usr/bin/perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;

use strict;
use warnings;

use lib 't/lib', 'lib';

use Test::More;
use Test::Exception;

Expand Down
3 changes: 2 additions & 1 deletion t/040_type_constraints/007_util_more_type_coercion.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;

use strict;
use warnings;
Expand Down
3 changes: 2 additions & 1 deletion t/040_type_constraints/009_union_types_and_coercions.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;

use strict;
use warnings;
Expand Down
3 changes: 2 additions & 1 deletion t/040_type_constraints/011_container_type_constraint.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;

use strict;
use warnings;
Expand Down
3 changes: 2 additions & 1 deletion t/040_type_constraints/016_subtyping_parameterized_types.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/perl
# This is automatically generated by author/import-moose-test.pl.
# DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
use t::lib::MooseCompat;
use lib "t/lib";
use MooseCompat;

use strict;
use warnings;
Expand Down