From: Rafael Kitover Date: Thu, 13 May 2010 09:22:57 +0000 (-0400) Subject: test for splitting mixed case columns on case boundary with words ending in digits X-Git-Tag: 0.07000~13 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a9a6e6bbea8a7bda16b348c24e63d7be3eea24ba;p=dbsrgits%2FDBIx-Class-Schema-Loader.git test for splitting mixed case columns on case boundary with words ending in digits --- diff --git a/t/25backcompat.t b/t/25backcompat.t index 2e1213d..cc4a755 100644 --- a/t/25backcompat.t +++ b/t/25backcompat.t @@ -1108,6 +1108,9 @@ sub run_v4_tests { ok (($schema->resultset('Routechange')->find(1)->can('quuxsid')), 'correct column accessor in 0.04006 mode'); + + is $schema->resultset('Routechange')->find(1)->foo2bar, 3, + 'correct column accessor for column with word ending with digit in v4 mode'; } sub run_v5_tests { @@ -1135,6 +1138,9 @@ sub run_v5_tests { ok (($schema->resultset('Routechange')->find(1)->can('quuxsid')), 'correct column accessor in v5 mode'); + + is $schema->resultset('Routechange')->find(1)->foo2bar, 3, + 'correct column accessor for column with word ending with digit in v5 mode'; } sub run_v6_tests { @@ -1167,6 +1173,9 @@ sub run_v6_tests { ok (($schema->resultset('Routechange')->find(1)->can('quuxsid')), 'correct column accessor in v6 mode'); + + is $schema->resultset('Routechange')->find(1)->foo2bar, 3, + 'correct column accessor for column with word ending with digit in v6 mode'; } sub run_v7_tests { @@ -1199,6 +1208,9 @@ sub run_v7_tests { ok (($schema->resultset('RouteChange')->find(1)->can('quuxs_id')), 'correct column accessor in current mode'); + + is $schema->resultset('RouteChange')->find(1)->foo2_bar, 3, + 'correct column accessor for column with word ending with digit in current mode'; } { diff --git a/t/lib/make_dbictest_db_with_unique.pm b/t/lib/make_dbictest_db_with_unique.pm index 4f3777e..6b6ab17 100644 --- a/t/lib/make_dbictest_db_with_unique.pm +++ b/t/lib/make_dbictest_db_with_unique.pm @@ -38,7 +38,8 @@ $dbh->do($_) for ( )|, q|CREATE TABLE RouteChange ( id INTEGER PRIMARY KEY, - QuuxsId INTEGER REFERENCES quuxs (quuxid) + QuuxsId INTEGER REFERENCES quuxs (quuxid), + Foo2Bar INTEGER )|, q|CREATE TABLE email ( id INTEGER PRIMARY KEY, @@ -58,7 +59,7 @@ $dbh->do($_) for ( q|INSERT INTO quuxs VALUES (1,20)|, q|INSERT INTO quuxs VALUES (2,19)|, q|INSERT INTO stations_visited VALUES (1,1)|, - q|INSERT INTO RouteChange VALUES (1,1)|, + q|INSERT INTO RouteChange VALUES (1,1,3)|, ); END { unlink($fn); }