Abolish wrapped in struct regexp - store the wrapped pattern pointer
[p5sagit/p5-mst-13.2.git] / ext / Win32CORE / t / win32core.t
CommitLineData
78ff2d7b 1#!perl
2
57d226e4 3use Test::More;
4BEGIN {
5 if ( $ENV{PERL_CORE} ) {
6 require Config;
7 if ( $Config::Config{extensions} !~ /(?<!\S)Win32CORE(?!\S)/ ) {
8 plan skip_all => "Win32CORE extension not built";
9 exit();
10 }
11 }
12
6bad109f 13 if ($^O eq 'cygwin') {
869efde7 14 plan skip_all => '$^E is not Win32::GetLastError() under Cygwin';
6bad109f 15 } else {
16 plan tests => 4;
17 }
57d226e4 18};
19use_ok( "Win32CORE" );
ad6e06ef 20
a13010ef 21# Make sure that Win32 is not yet loaded
22ok(!defined &Win32::ExpandEnvironmentStrings);
23
ad6e06ef 24# [perl #42925] - Loading Win32::GetLastError() via the forwarder function
25# should not affect the last error being retrieved
26$^E = 42;
27is(Win32::GetLastError(), 42, 'GetLastError() works on the first call');
a13010ef 28
29# Now all Win32::* functions should be loaded
30ok(defined &Win32::ExpandEnvironmentStrings);