9
if ( ( $^O ne 'MSWin32' ) and ( $^O ne 'cygwin' ) ) {
11
ok( 1, 'Skipped, only applies to Windows' );
20
$TODO = 'Failing this is no reason to stop install' unless $ENV{AUTOMATED_TESTING};
22
# The test file name is hard-coded because we need to play around with the pathname (/ or \):
24
ok( open( my $fh, '>', 't/files/padre-file-test' ), 'Create test file' );
27
is( -s 't/files/padre-file-test', 3, 'Check test file size' );
29
my $file = Padre::File->new('t/files/padre-file-test');
30
ok( defined($file), 'Create Padre::File object' );
31
ok( $file->exists, 'File exists' );
33
# Now we have a Padre::File object and a testfile to play with...
35
$file->{filename} = 'T/Files/Padre-File-Test';
36
$file->_reformat_filename;
37
is( $file->{filename}, 't\files\Padre-File-Test', 'Correct wrong case' );
39
$file->{filename} = 'T\Files\Padre-File-Test';
40
$file->_reformat_filename;
41
is( $file->{filename}, 't\files\Padre-File-Test', 'Correct wrong case' );
43
my $Crap = 'X:\foo\bar\padre-nonexistent\testfile';
44
$file->{filename} = $Crap;
45
$file->_reformat_filename;
46
is( $file->{filename}, $Crap, 'Keep the filename on nonexistent file' );
51
unlink 't/files/padre-file-test';