['force' => 'Be forceful with some operations'],
['trace' => 'Turn on DBIx::Class trace output'],
['quiet' => 'Be less verbose'],
- ['debug' => 'Print debug information'],
- ['I:s@' => 'Same as perl\'s -I'],
+ ['I:s@' => 'Same as perl\'s -I, prepended to current @INC'],
)
);
);
}
+# FIXME - lowercasin will eventually go away when Getopt::Long::Descriptive is fixed
if($opts->{i}) {
$opts->{include_dirs} = delete $opts->{i};
}
my @json_backends = qw/XS JSON DWIW/;
my $tests_per_run = 5;
-
plan tests => ($tests_per_run * @json_backends) + 1;
+
+# test the script is setting @INC properly
+test_exec (qw| -It/lib/testinclude --schema=DBICTestAdminInc --op=deploy --connect=[] |);
+cmp_ok ( $? >> 8, '==', 70, 'Correct exit code from deploying a custom INC schema' );
+
for my $js (@json_backends) {
eval {JSON::Any->import ($js) };
$ENV{JSON_ANY_ORDER} = $js;
eval { test_dbicadmin () };
diag $@ if $@;
-
}
}
-# test the script is setting @INC properly
-test_exec (qw| -It/lib/testinclude --schema=DBICTestAdminInc --op=deploy --connect=[] |);
-cmp_ok ( $? >> 8, '==', 70, 'Correct exit code from deploying a custom INC schema' );
-
sub test_dbicadmin {
my $schema = DBICTest->init_schema( sqlite_use_file => 1 ); # reinit a fresh db for every run
return (
qw|--quiet --schema=DBICTest::Schema --class=Employee|,
q|--connect=["dbi:SQLite:dbname=t/var/DBIxClass.db","","",{"AutoCommit":1}]|,
- qw|--force|,
+ qw|--force -I testincludenoniterference|,
);
}