plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_rdbms_ase')
unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_rdbms_ase');
-# first run the test without the lang variable set
-# it is important to do this before module load, hence
-# the subprocess before the optdep check
-if ($ENV{LANG} and $ENV{LANG} ne 'C') {
- my $oldlang = $ENV{LANG};
- local $ENV{LANG} = 'C';
-
- pass ("Your lang is set to $oldlang - testing with C first");
-
- my @cmd = ($^X, __FILE__);
-
- # this is cheating, and may even hang here and there (testing on windows passed fine)
- # will be replaced with Test::SubExec::Noninteractive in due course
- require IPC::Open2;
- IPC::Open2::open2(my $out, my $in, @cmd);
- while (my $ln = <$out>) {
- print " $ln";
- }
-
- wait;
- ok (! $?, "Wstat $? from: @cmd");
-}
-
my @storage_types = (
'DBI::Sybase::ASE',
'DBI::Sybase::ASE::NoBindVars',
# test primary key handling
my $new = $schema->resultset('Artist')->create({ name => 'foo' });
+ like $new->artistid, qr/^\d+\z/, 'Auto-PK returned a number';
ok($new->artistid > 0, "Auto-PK worked");
$seen_id{$new->artistid}++;
# mostly stolen from the blob stuff Nniuq wrote for t/73oracle.t
SKIP: {
skip 'TEXT/IMAGE support does not work with FreeTDS', 22
- if $schema->storage->using_freetds;
+ if $schema->storage->_using_freetds;
my $dbh = $schema->storage->_dbh;
{
my $maxloblen = length $binstr{'large'};
- if (not $schema->storage->using_freetds) {
+ if (not $schema->storage->_using_freetds) {
$dbh->{'LongReadLen'} = $maxloblen * 2;
} else {
$dbh->do("set textsize ".($maxloblen * 2));
}
# test insert in an outer transaction when there's an active cursor
- TODO: {
+ {
local $TODO = 'this should work once we have eager cursors';
# clear state, or we get a deadlock on $row->delete
is $ping_count, 0, 'no pings';
+# if tests passed and did so under a non-C lang - let's rerun the test
+if (Test::Builder->new->is_passing and $ENV{LANG} and $ENV{LANG} ne 'C') {
+ my $oldlang = $ENV{LANG};
+ local $ENV{LANG} = 'C';
+
+ pass ("Your lang is set to $oldlang - retesting with C");
+
+ local $ENV{PATH};
+ my @cmd = map { $_ =~ /(.+)/ } ($^X, __FILE__);
+
+ # this is cheating, and may even hang here and there (testing on windows passed fine)
+ # will be replaced with Test::SubExec::Noninteractive in due course
+ require IPC::Open2;
+ IPC::Open2::open2(my $out, undef, @cmd);
+ while (my $ln = <$out>) {
+ print " $ln";
+ }
+
+ wait;
+ ok (! $?, "Wstat $? from: @cmd");
+}
+
done_testing;
# clean up our mess
eval { $dbh->do("DROP TABLE $_") }
for qw/artist bindtype_test money_test computed_column_test/;
}
+
+ undef $schema;
}