[Bast-commits] r5169 - in DBIx-Class/0.08/branches/rt_bug_41083/t:
. lib/DBICNSTest/RtBug41083 lib/DBICNSTest/RtBug41083/ResultSet
lib/DBICNSTest/RtBug41083/ResultSet_A
lib/DBICNSTest/RtBug41083/Schema lib/DBICNSTest/RtBug41083/Schema/A
lib/DBICNSTest/RtBug41083/Schema_A
lib/DBICNSTest/RtBug41083/Schema_A/A
jmmills at dev.catalyst.perl.org
jmmills at dev.catalyst.perl.org
Thu Nov 20 15:29:29 GMT 2008
Author: jmmills
Date: 2008-11-20 15:29:29 +0000 (Thu, 20 Nov 2008)
New Revision: 5169
Added:
DBIx-Class/0.08/branches/rt_bug_41083/t/lib/DBICNSTest/RtBug41083/ResultSet/A.pm
DBIx-Class/0.08/branches/rt_bug_41083/t/lib/DBICNSTest/RtBug41083/ResultSet_A/
DBIx-Class/0.08/branches/rt_bug_41083/t/lib/DBICNSTest/RtBug41083/ResultSet_A/A.pm
DBIx-Class/0.08/branches/rt_bug_41083/t/lib/DBICNSTest/RtBug41083/Schema/A.pm
DBIx-Class/0.08/branches/rt_bug_41083/t/lib/DBICNSTest/RtBug41083/Schema/A/
DBIx-Class/0.08/branches/rt_bug_41083/t/lib/DBICNSTest/RtBug41083/Schema/A/Sub.pm
DBIx-Class/0.08/branches/rt_bug_41083/t/lib/DBICNSTest/RtBug41083/Schema_A/
DBIx-Class/0.08/branches/rt_bug_41083/t/lib/DBICNSTest/RtBug41083/Schema_A/A.pm
DBIx-Class/0.08/branches/rt_bug_41083/t/lib/DBICNSTest/RtBug41083/Schema_A/A/
DBIx-Class/0.08/branches/rt_bug_41083/t/lib/DBICNSTest/RtBug41083/Schema_A/A/Sub.pm
Modified:
DBIx-Class/0.08/branches/rt_bug_41083/t/39load_namespaces_rt41083.t
Log:
Added weird passes/failes test
Modified: DBIx-Class/0.08/branches/rt_bug_41083/t/39load_namespaces_rt41083.t
===================================================================
--- DBIx-Class/0.08/branches/rt_bug_41083/t/39load_namespaces_rt41083.t 2008-11-20 13:49:39 UTC (rev 5168)
+++ DBIx-Class/0.08/branches/rt_bug_41083/t/39load_namespaces_rt41083.t 2008-11-20 15:29:29 UTC (rev 5169)
@@ -8,20 +8,35 @@
plan tests => 2;
+sub _chk_warning {
+ defined $_[0]?
+ $_[0] !~ qr/We found ResultSet class '([^']+)' for '([^']+)', but it seems that you had already set '([^']+)' to use '([^']+)' instead/ :
+ 1
+}
+
my $warnings;
eval {
local $SIG{__WARN__} = sub { $warnings .= shift };
package DBICNSTest::RtBug41083;
use base 'DBIx::Class::Schema';
__PACKAGE__->load_namespaces(
+ result_namespace => 'Schema_A',
+ resultset_namespace => 'ResultSet_A',
+ default_resultset_class => 'ResultSet'
+ );
+};
+ok(!$@) or diag $@;
+ok(_chk_warning($warnings), 'Works here');
+
+eval {
+ local $SIG{__WARN__} = sub { $warnings .= shift };
+ package DBICNSTest::RtBug41083;
+ use base 'DBIx::Class::Schema';
+ __PACKAGE__->load_namespaces(
result_namespace => 'Schema',
resultset_namespace => 'ResultSet',
default_resultset_class => 'ResultSet'
);
};
ok(!$@) or diag $@;
-ok(
- $warnings !~
- qr/We found ResultSet class '([^']+)' for '([^']+)', but it seems that you had already set '([^']+)' to use '([^']+)' instead/,
- 'Proxy sub class did not generate an error'
-);
+ok(_chk_warning($warnings), 'Fails here');
Added: DBIx-Class/0.08/branches/rt_bug_41083/t/lib/DBICNSTest/RtBug41083/ResultSet/A.pm
===================================================================
--- DBIx-Class/0.08/branches/rt_bug_41083/t/lib/DBICNSTest/RtBug41083/ResultSet/A.pm (rev 0)
+++ DBIx-Class/0.08/branches/rt_bug_41083/t/lib/DBICNSTest/RtBug41083/ResultSet/A.pm 2008-11-20 15:29:29 UTC (rev 5169)
@@ -0,0 +1,5 @@
+package DBICNSTest::RtBug41083::ResultSet::A;
+use strict;
+use warnings;
+use base 'DBICNSTest::RtBug41083::ResultSet';
+1;
Added: DBIx-Class/0.08/branches/rt_bug_41083/t/lib/DBICNSTest/RtBug41083/ResultSet_A/A.pm
===================================================================
--- DBIx-Class/0.08/branches/rt_bug_41083/t/lib/DBICNSTest/RtBug41083/ResultSet_A/A.pm (rev 0)
+++ DBIx-Class/0.08/branches/rt_bug_41083/t/lib/DBICNSTest/RtBug41083/ResultSet_A/A.pm 2008-11-20 15:29:29 UTC (rev 5169)
@@ -0,0 +1,5 @@
+package DBICNSTest::RtBug41083::ResultSet_A::A;
+use strict;
+use warnings;
+use base 'DBICNSTest::RtBug41083::ResultSet';
+1;
Added: DBIx-Class/0.08/branches/rt_bug_41083/t/lib/DBICNSTest/RtBug41083/Schema/A/Sub.pm
===================================================================
--- DBIx-Class/0.08/branches/rt_bug_41083/t/lib/DBICNSTest/RtBug41083/Schema/A/Sub.pm (rev 0)
+++ DBIx-Class/0.08/branches/rt_bug_41083/t/lib/DBICNSTest/RtBug41083/Schema/A/Sub.pm 2008-11-20 15:29:29 UTC (rev 5169)
@@ -0,0 +1,5 @@
+package DBICNSTest::RtBug41083::Schema::A::Sub;
+use strict;
+use warnings;
+use base 'DBICNSTest::RtBug41083::Schema::A';
+1;
Added: DBIx-Class/0.08/branches/rt_bug_41083/t/lib/DBICNSTest/RtBug41083/Schema/A.pm
===================================================================
--- DBIx-Class/0.08/branches/rt_bug_41083/t/lib/DBICNSTest/RtBug41083/Schema/A.pm (rev 0)
+++ DBIx-Class/0.08/branches/rt_bug_41083/t/lib/DBICNSTest/RtBug41083/Schema/A.pm 2008-11-20 15:29:29 UTC (rev 5169)
@@ -0,0 +1,8 @@
+package DBICNSTest::RtBug41083::Schema::A;
+use strict;
+use warnings;
+use base 'DBIx::Class';
+__PACKAGE__->load_components('Core');
+__PACKAGE__->table('a');
+__PACKAGE__->add_columns('a');
+1;
Added: DBIx-Class/0.08/branches/rt_bug_41083/t/lib/DBICNSTest/RtBug41083/Schema_A/A/Sub.pm
===================================================================
--- DBIx-Class/0.08/branches/rt_bug_41083/t/lib/DBICNSTest/RtBug41083/Schema_A/A/Sub.pm (rev 0)
+++ DBIx-Class/0.08/branches/rt_bug_41083/t/lib/DBICNSTest/RtBug41083/Schema_A/A/Sub.pm 2008-11-20 15:29:29 UTC (rev 5169)
@@ -0,0 +1,5 @@
+package DBICNSTest::RtBug41083::Schema_A::A::Sub;
+use strict;
+use warnings;
+use base 'DBICNSTest::RtBug41083::Schema_A::A';
+1;
Added: DBIx-Class/0.08/branches/rt_bug_41083/t/lib/DBICNSTest/RtBug41083/Schema_A/A.pm
===================================================================
--- DBIx-Class/0.08/branches/rt_bug_41083/t/lib/DBICNSTest/RtBug41083/Schema_A/A.pm (rev 0)
+++ DBIx-Class/0.08/branches/rt_bug_41083/t/lib/DBICNSTest/RtBug41083/Schema_A/A.pm 2008-11-20 15:29:29 UTC (rev 5169)
@@ -0,0 +1,8 @@
+package DBICNSTest::RtBug41083::Schema_A::A;
+use strict;
+use warnings;
+use base 'DBIx::Class';
+__PACKAGE__->load_components('Core');
+__PACKAGE__->table('a');
+__PACKAGE__->add_columns('a');
+1;
More information about the Bast-commits
mailing list