X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Finflate%2Ffile_column.t;h=1b69e51de8ddc7094cbbcaa6fe2773cc59c4ead0;hb=refs%2Fheads%2Fcurrent%2Fdq;hp=24407e2f993f2e237f7cc8d4a62c33e214c2b327;hpb=123df5269e2a19f93ff072bbf92832fb23d19f4c;p=dbsrgits%2FDBIx-Class.git diff --git a/t/inflate/file_column.t b/t/inflate/file_column.t index 24407e2..1b69e51 100644 --- a/t/inflate/file_column.t +++ b/t/inflate/file_column.t @@ -42,6 +42,15 @@ my $schema = DBICTest->init_schema; plan tests => 10; +if (not $ENV{DBICTEST_SQLT_DEPLOY}) { + $schema->storage->dbh->do(<<'EOF'); + CREATE TABLE file_columns ( + id INTEGER PRIMARY KEY, + file VARCHAR(255) + ) +EOF +} + my $rs = $schema->resultset('FileColumn'); my $source_file = file(__FILE__); my $fname = $source_file->basename; @@ -79,7 +88,7 @@ $fh = $new_source_file->open('r') or die "failed to open $new_source_file: $!\n" $fc->file({ handle => $fh, filename => $new_fname }); $fc->update; -TODO: { +{ local $TODO = 'design change required'; ok ( ! -e $storage, 'old storage does not exist' ); }; @@ -92,8 +101,8 @@ $fc = $rs->find({ id => $fc->id }); is ( $fc->file->{filename}, $new_fname, 'new filname matches' ); ok ( compare($new_storage, $new_source_file) == 0, 'new content matches' ); -if ($^O =~ /win32|cygwin/i) { - close $fc->file->{handle}; # can't delete open files on Windows +if ($^O eq 'MSWin32') { + close $fc->file->{handle}; # can't delete open files on Win32 } $fc->delete; @@ -111,8 +120,8 @@ $storage = file( $fc->file->{filename}, ); -TODO: { +{ local $TODO = 'need resultset delete override to delete_all'; $rs->delete; ok ( ! -e $storage, 'storage does not exist after $rs->delete' ); -}; +}