Skip Menu |

This queue is for tickets about the Win32-GuiTest CPAN distribution.

Report information
The Basics
Id: 63310
Status: resolved
Priority: 0/
Queue: Win32-GuiTest

People
Owner: Nobody in particular
Requestors: JDB [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.58
Fixed in: (no value)



Subject: t/02_calc.t fails when not running as administrator
I've only double-checked on Windows 2003 Server, but calc.exe will not remember to start in Scientific mode unless you are running as Administrator. Running as a normal user it always starts in Standard mode, even if it has just been closed while in Scientific mode before.
If you could produce a patch, I'd definitely incorporate.
Subject: RE: [rt.cpan.org #63310] t/02_calc.t fails when not running as administrator
Date: Wed, 24 Nov 2010 13:13:57 -0800
To: <bug-Win32-GuiTest [...] rt.cpan.org>
From: "Jan Dubois" <jand [...] activestate.com>
On Wed, 24 Nov 2010, KARASIK via RT wrote: Show quoted text
> > If you could produce a patch, I'd definitely incorporate.
I guess the best thing to do is to bail out if you can't find the "Hex" Window: diff -du .backup~/02_calc.t~ 02_calc.t --- .backup~/02_calc.t~ 2010-06-13 11:45:09.000000000 -0700 +++ 02_calc.t 2010-11-24 12:54:24.806463400 -0800 @@ -63,7 +63,11 @@ my $hex; SKIP: { ($hex) = FindWindowLike($calc, "Hex"); - ok(defined $hex, "hex found") or skip "could not find Hex", 2; + unless (defined $hex) { + print STDERR "# couldn't switch to scientific mode (requires admin?)!\n"; + SendKeys("%{F4}"); + exit; + } ok(IsWindow($hex), "Hex is a window"); ok(!IsCheckedButton($hex), "Hex is not checked"); } (or course the SKIP block doesn't need to be there anymore now, but I wanted to keep the diff small). While testing this I noticed that if I run calc.exe as administrator, switch to Scientific mode, and quit, then calc.exe will start in scientific mode for the non-admin users as well. So it looks like there is just a single global setting for this that only admin users can change... Lovely! :) Cheers, -Jan
fixed, thanks a lot!