From: Jan Dubois Date: Mon, 14 May 2007 15:18:22 +0000 (-0700) Subject: RE: [perl #42925] Win32::GetLastError fails when first called X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a13010efb6f6994c9c950ae286dadaa7685194d4;p=p5sagit%2Fp5-mst-13.2.git RE: [perl #42925] Win32::GetLastError fails when first called From: "Jan Dubois" 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 --- diff --git a/ext/Win32CORE/t/win32core.t b/ext/Win32CORE/t/win32core.t index 7bc8968..d45eb38 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);