Dev release changes
[dbsrgits/DBIx-Class.git] / t / inflate / file_column.t
index 24407e2..e200619 100644 (file)
@@ -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;
@@ -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;