use MRO::Compat();
use Carp 'confess';
use List::Util 'shuffle';
+use Config;
SKIP: {
- skip 'Lean load pattern testing unsafe with $ENV{PERL5OPT}', 1 if $ENV{PERL5OPT};
- skip 'Lean load pattern testing useless with $ENV{RELEASE_TESTING}', 1 if $ENV{RELEASE_TESTING};
+ skip 'Lean load pattern testing makes no sense with TempExtlib', 1
+ if grep { $_ =~ /TempExtlib/ } @INC;
+
+ skip 'Lean load pattern testing unsafe with $ENV{PERL5OPT}', 1
+ if $ENV{PERL5OPT};
+
+ skip 'Lean load pattern testing unsafe with sitecustomize.pl', 1
+ if grep { $_ =~ m| \/ sitecustomize\.pl $ |x } keys %INC;
+
+ skip 'Lean load pattern testing useless with $ENV{RELEASE_TESTING}', 1
+ if $ENV{RELEASE_TESTING};
+
+ skip 'Lean load pattern testing useless under cperl', 1
+ if $Config{usecperl};
+
is_deeply
$inc_before,
[],
# regular
is_deeply(
- DBIx::Class::Optional::Dependencies->modreq_list_for('test_rdbms_pg'),
+ DBIx::Class::Optional::Dependencies->modreq_list_for([shuffle qw( test_rdbms_pg binary_data )]),
{ 'DBD::Pg' => '2.009002' },
'optional dependencies list for testing Postgres without envvar',
);
is_deeply(
- DBIx::Class::Optional::Dependencies->req_list_for('test_rdbms_pg'),
+ DBIx::Class::Optional::Dependencies->req_list_for([shuffle qw( test_rdbms_pg binary_data )]),
undef,
'optional dependencies list for testing Postgres without envvar',
);
);
is(
- DBIx::Class::Optional::Dependencies->req_missing_for([qw( rdbms_pg test_rdbms_pg )]),
+ DBIx::Class::Optional::Dependencies->req_missing_for([shuffle qw( rdbms_pg test_rdbms_pg binary_data )]),
'DBD::Pg~2.009002 as well as the following group(s) of environment variables: DBICTEST_PG_DSN/..._USER/..._PASS',
'optional dependencies for testing Postgres without envvar'
);
is(
- DBIx::Class::Optional::Dependencies->req_missing_for([shuffle qw( test_rdbms_mysql test_rdbms_pg )]),
+ DBIx::Class::Optional::Dependencies->req_missing_for([shuffle qw( test_rdbms_mysql test_rdbms_pg binary_data)]),
'DBD::mysql DBD::Pg~2.009002 as well as the following group(s) of environment variables: DBICTEST_MYSQL_DSN/..._USER/..._PASS and DBICTEST_PG_DSN/..._USER/..._PASS',
'optional dependencies for testing Postgres+MySQL without envvars'
);
$ENV{DBICTEST_PG_DSN} = 'boo';
is_deeply (
- DBIx::Class::Optional::Dependencies->modreq_list_for([shuffle qw( rdbms_pg test_rdbms_pg )]),
+ DBIx::Class::Optional::Dependencies->modreq_list_for([shuffle qw( rdbms_pg test_rdbms_pg binary_data)]),
{ 'DBD::Pg' => '2.009002' },
'optional module dependencies list for testing Postgres matches with envvar',
);
is(
- DBIx::Class::Optional::Dependencies->req_missing_for([shuffle qw( rdbms_pg test_rdbms_pg )]),
+ DBIx::Class::Optional::Dependencies->req_missing_for([shuffle qw( rdbms_pg test_rdbms_pg binary_data )]),
'DBD::Pg~2.009002',
'optional dependencies error text for testing Postgres matches with evvar',
);