From: "Jan Dubois" <jand@activestate.com>
Message-ID: <
014e01c79675$c8bfc6e0$5a3f54a0$@com>
Improved test: make sure that Win32 isn't already loaded when you call
Win32::GetLastError()
p4raw-id: //depot/perl@31219
}
}
- plan tests => 2;
+ plan tests => 4;
};
use_ok( "Win32CORE" );
+# Make sure that Win32 is not yet loaded
+ok(!defined &Win32::ExpandEnvironmentStrings);
+
# [perl #42925] - Loading Win32::GetLastError() via the forwarder function
# should not affect the last error being retrieved
$^E = 42;
is(Win32::GetLastError(), 42, 'GetLastError() works on the first call');
+
+# Now all Win32::* functions should be loaded
+ok(defined &Win32::ExpandEnvironmentStrings);