diff options
author | Jan Dubois <jand@activestate.com> | 2007-05-14 08:18:22 -0700 |
---|---|---|
committer | Steve Hay <SteveHay@planit.com> | 2007-05-15 08:15:32 +0000 |
commit | a13010efb6f6994c9c950ae286dadaa7685194d4 (patch) | |
tree | 9055a2532d284b0851698ffe483caea257fb3f00 /ext/Win32CORE | |
parent | d7f23a062a625a1f0067a15d3cea5401ea21006c (diff) | |
download | perl-a13010efb6f6994c9c950ae286dadaa7685194d4.tar.gz |
RE: [perl #42925] Win32::GetLastError fails when first called
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
Diffstat (limited to 'ext/Win32CORE')
-rw-r--r-- | ext/Win32CORE/t/win32core.t | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/Win32CORE/t/win32core.t b/ext/Win32CORE/t/win32core.t index 7bc8968c55..d45eb3831f 100644 --- a/ext/Win32CORE/t/win32core.t +++ b/ext/Win32CORE/t/win32core.t @@ -10,11 +10,17 @@ BEGIN { } } - 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); |