$num_rescans++ if $self->{vendor} eq 'Firebird';
plan tests => @connect_info *
- (207 + $num_rescans * $col_accessor_map_tests + $extra_count + ($self->{data_type_tests}{test_count} || 0));
+ (209 + $num_rescans * $col_accessor_map_tests + $extra_count + ($self->{data_type_tests}{test_count} || 0));
foreach my $info_idx (0..$#connect_info) {
my $info = $connect_info[$info_idx];
$dbh->do($_) for @{ $self->{extra}{create} || [] };
if (not ($self->{vendor} eq 'mssql' && $dbh->{Driver}{Name} eq 'Sybase')) {
- $dbh->do($_) for @{ $self->{data_type_tests}{ddl} || []};
+ foreach my $ddl (@{ $self->{data_type_tests}{ddl} || []}) {
+ if (my $cb = $self->{data_types_ddl_cb}) {
+ $cb->($ddl);
+ }
+ else {
+ $dbh->do($_)
+ }
+ }
}
$self->{_created} = 1;
is( $class2->column_info('crumb_crisp_coating')->{accessor}, 'trivet',
'col_accessor_map is being run' );
+ is $class1->column_info('dat')->{is_nullable}, 0,
+ 'is_nullable=0 detection';
+
+ is $class2->column_info('set_primary_key')->{is_nullable}, 1,
+ 'is_nullable=1 detection';
+
SKIP: {
skip $self->{skip_rels}, 131 if $self->{skip_rels};
find $find_cb, DUMP_DIR;
-# system "rm -f /tmp/before_rescan/* /tmp/after_rescan/*";
-# system "cp $tdir/common_dump/DBIXCSL_Test/Schema/*.pm /tmp/before_rescan";
+# system "rm -rf /tmp/before_rescan /tmp/after_rescan";
+# system "mkdir /tmp/before_rescan";
+# system "mkdir /tmp/after_rescan";
+# system "cp -a @{[DUMP_DIR]} /tmp/before_rescan";
my $before_digest = $digest->b64digest;
is_deeply(\@new, [ qw/LoaderTest30/ ], "Rescan");
-# system "cp t/_common_dump/DBIXCSL_Test/Schema/*.pm /tmp/after_rescan";
+# system "cp -a @{[DUMP_DIR]} /tmp/after_rescan";
$digest = Digest::MD5->new;
find $find_cb, DUMP_DIR;
$dbh->do($_) foreach (@statements);
if (not ($self->{vendor} eq 'mssql' && $dbh->{Driver}{Name} eq 'Sybase')) {
- $dbh->do($_) foreach (@{ $self->{data_type_tests}{ddl} || [] });
+ foreach my $ddl (@{ $self->{data_type_tests}{ddl} || [] }) {
+ if (my $cb = $self->{data_types_ddl_cb}) {
+ $cb->($ddl);
+ }
+ else {
+ $dbh->do($_)
+ }
+ }
}
unless ($self->{skip_rels}) {
my %seen_col_names;
while (my ($col_def, $expected_info) = each %$types) {
- (my $type_alias = $col_def) =~ s/\( ([^)]+) \)//xg;
+ (my $type_alias = $col_def) =~ s/\( (.+) \)(?=(?:[^()]* '(?:[^']* (?:''|\\')* [^']*)* [^\\']' [^()]*)*\z)//xg;
my $size = $1;
$size = '' unless defined $size;
+ $size = '' unless $size =~ /^[\d, ]+\z/;
$size =~ s/\s+//g;
my @size = split /,/, $size;