[PATCH] regedit/tests: Skip tests if running as non-elevated admin.
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> --- programs/regedit/tests/regedit.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/programs/regedit/tests/regedit.c b/programs/regedit/tests/regedit.c index d558f2b..c8f3434 100644 --- a/programs/regedit/tests/regedit.c +++ b/programs/regedit/tests/regedit.c @@ -3635,6 +3635,12 @@ START_TEST(regedit) return; } + if (!run_regedit_exe("regedit.exe") && GetLastError() == ERROR_ELEVATION_REQUIRED) + { + win_skip("User is a non-elevated admin; skipping regedit tests.\n"); + return; + } + test_basic_import(); test_basic_import_unicode(); test_basic_import_31(); -- 2.7.4
Zebediah Figura <z.figura12(a)gmail.com> writes:
@@ -3635,6 +3635,12 @@ START_TEST(regedit) return; }
+ if (!run_regedit_exe("regedit.exe") && GetLastError() == ERROR_ELEVATION_REQUIRED) + { + win_skip("User is a non-elevated admin; skipping regedit tests.\n"); + return; + }
This pops up the regedit GUI and does nothing for 10 seconds, I don't think we want that. -- Alexandre Julliard julliard(a)winehq.org
On 12/22/2017 09:34 AM, Alexandre Julliard wrote:
Zebediah Figura <z.figura12(a)gmail.com> writes:
@@ -3635,6 +3635,12 @@ START_TEST(regedit) return; }
+ if (!run_regedit_exe("regedit.exe") && GetLastError() == ERROR_ELEVATION_REQUIRED) + { + win_skip("User is a non-elevated admin; skipping regedit tests.\n"); + return; + }
This pops up the regedit GUI and does nothing for 10 seconds, I don't think we want that.
Whoops, I meant to use /s. Thanks for catching this.
participants (2)
-
Alexandre Julliard -
Zebediah Figura