[Bast-commits] r9482 - in
DBIx-Class/0.08/branches/dbicadmin-non-versioned: script
t/admin t/lib/testinclude
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Mon May 31 16:47:34 GMT 2010
Author: ribasushi
Date: 2010-05-31 17:47:34 +0100 (Mon, 31 May 2010)
New Revision: 9482
Modified:
DBIx-Class/0.08/branches/dbicadmin-non-versioned/script/dbicadmin
DBIx-Class/0.08/branches/dbicadmin-non-versioned/t/admin/10script.t
DBIx-Class/0.08/branches/dbicadmin-non-versioned/t/lib/testinclude/DBICTestAdminInc.pm
Log:
Some comments
Modified: DBIx-Class/0.08/branches/dbicadmin-non-versioned/script/dbicadmin
===================================================================
--- DBIx-Class/0.08/branches/dbicadmin-non-versioned/script/dbicadmin 2010-05-31 16:07:35 UTC (rev 9481)
+++ DBIx-Class/0.08/branches/dbicadmin-non-versioned/script/dbicadmin 2010-05-31 16:47:34 UTC (rev 9482)
@@ -62,8 +62,7 @@
['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'],
)
);
@@ -88,6 +87,7 @@
);
}
+# FIXME - lowercasin will eventually go away when Getopt::Long::Descriptive is fixed
if($opts->{i}) {
$opts->{include_dirs} = delete $opts->{i};
}
Modified: DBIx-Class/0.08/branches/dbicadmin-non-versioned/t/admin/10script.t
===================================================================
--- DBIx-Class/0.08/branches/dbicadmin-non-versioned/t/admin/10script.t 2010-05-31 16:07:35 UTC (rev 9481)
+++ DBIx-Class/0.08/branches/dbicadmin-non-versioned/t/admin/10script.t 2010-05-31 16:47:34 UTC (rev 9482)
@@ -17,9 +17,13 @@
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) };
@@ -29,14 +33,9 @@
$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
@@ -73,7 +72,7 @@
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|,
);
}
Modified: DBIx-Class/0.08/branches/dbicadmin-non-versioned/t/lib/testinclude/DBICTestAdminInc.pm
===================================================================
--- DBIx-Class/0.08/branches/dbicadmin-non-versioned/t/lib/testinclude/DBICTestAdminInc.pm 2010-05-31 16:07:35 UTC (rev 9481)
+++ DBIx-Class/0.08/branches/dbicadmin-non-versioned/t/lib/testinclude/DBICTestAdminInc.pm 2010-05-31 16:47:34 UTC (rev 9482)
@@ -4,6 +4,6 @@
our $loaded = 1;
sub connect { bless {}, __PACKAGE__ }
-sub deploy { exit 70 }
+sub deploy { exit 70 } # this is what the test will expect to see
1;
More information about the Bast-commits
mailing list