James Hawkins : advpack: Add a few more tests for SetPerUserSecValues.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Apr 7 13:30:51 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: d7199a483616b83cbfa7e60d821e94147cb3fc16
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=d7199a483616b83cbfa7e60d821e94147cb3fc16

Author: James Hawkins <truiken at gmail.com>
Date:   Fri Apr  7 08:30:21 2006 -0500

advpack: Add a few more tests for SetPerUserSecValues.

---

 dlls/advpack/tests/advpack.c |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/dlls/advpack/tests/advpack.c b/dlls/advpack/tests/advpack.c
index 15cf3fc..0ff8bb9 100644
--- a/dlls/advpack/tests/advpack.c
+++ b/dlls/advpack/tests/advpack.c
@@ -425,7 +425,6 @@ static void setperusersecvalues_test()
     HRESULT hr;
     HKEY guid;
 
-    lstrcpy(peruser.szGUID, "guid");
     lstrcpy(peruser.szDispName, "displayname");
     lstrcpy(peruser.szLocale, "locale");
     lstrcpy(peruser.szStub, "stub");
@@ -434,7 +433,25 @@ static void setperusersecvalues_test()
     peruser.dwIsInstalled = 1;
     peruser.bRollback = FALSE;
 
+    /* try a NULL pPerUser */
+    hr = pSetPerUserSecValues(NULL);
+    todo_wine
+    {
+        ok(hr == S_OK, "Expected S_OK, got %ld\n", hr);
+    }
+    ok(!OPEN_GUID_KEY(), "Expected guid key to not exist\n");
+
+    /* at the very least, szGUID must be valid */
+    peruser.szGUID[0] = '\0';
+    hr = pSetPerUserSecValues(&peruser);
+    todo_wine
+    {
+        ok(hr == S_OK, "Expected S_OK, got %ld\n", hr);
+    }
+    ok(!OPEN_GUID_KEY(), "Expected guid key to not exist\n");
+
     /* set initial values */
+    lstrcpy(peruser.szGUID, "guid");
     hr = pSetPerUserSecValues(&peruser);
     todo_wine
     {




More information about the wine-cvs mailing list