File: win32.t

package info (click to toggle)
libtest-file-perl 1.29-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 180 kB
  • ctags: 40
  • sloc: perl: 771; makefile: 2
file content (38 lines) | stat: -rw-r--r-- 590 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
use strict;
use warnings;

use Test::Builder::Tester;
use Test::More tests => 8;

use_ok( 'Test::File' );

ok( defined &{ "Test::File::_win32" }, "_win32 defined" );

{
local $^O = 'darwin';
ok( ! Test::File::_win32(), "Returns false for darwin" );
}

{
local $^O = 'Win32';
ok( Test::File::_win32(), "Returns true for Win32" );
}

{
local $^O = 'Win32';

my @subs = qw(
	file_mode_is file_mode_isnt 
	file_executable_ok file_not_executable_ok 
	);

foreach my $sub ( @subs )
	{
	no strict 'refs';
	
	test_out("ok 1 # skip $sub doesn't work on Windows!");
	&{$sub}();	
	test_test();
	}
	
}