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