From: Rafael Kitover Date: Sat, 17 Mar 2012 00:24:36 +0000 (-0400) Subject: remove some Win32 workarounds in tests from cygwin X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9fb047556029305e3df06e50ec0fd0c995617811;p=dbsrgits%2FDBIx-Class-Historic.git remove some Win32 workarounds in tests from cygwin Cygwin can delete open files, so change some workarounds we had in tests for closing open files before deleting them that were for both MSWin32 and cygwin to be for MSWin32 only. --- diff --git a/t/inflate/file_column.t b/t/inflate/file_column.t index 24588c0..e200619 100644 --- a/t/inflate/file_column.t +++ b/t/inflate/file_column.t @@ -101,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; diff --git a/t/storage/reconnect.t b/t/storage/reconnect.t index a4b7ad0..d8ddbbc 100644 --- a/t/storage/reconnect.t +++ b/t/storage/reconnect.t @@ -54,8 +54,8 @@ chmod 0000, $db_orig; } 'The operation failed'; } -# otherwise can't unlink the fake db file on these systems -$schema->storage->_dbh->disconnect if $^O =~ /MSWin32|cygwin/i; +# otherwise can't unlink the fake db file +$schema->storage->_dbh->disconnect if $^O eq 'MSWin32'; ### Now, move the db file back to the correct name unlink($db_orig) or die "could not delete $db_orig: $!";