Paul Vriens : setupapi/tests: Test to show cleanup should not be needed.
Alexandre Julliard
julliard at winehq.org
Wed May 28 04:56:52 CDT 2008
Module: wine
Branch: master
Commit: b58cab405af6785f8e499be8e8737b886468ffa6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b58cab405af6785f8e499be8e8737b886468ffa6
Author: Paul Vriens <paul.vriens.wine at gmail.com>
Date: Tue May 27 15:31:58 2008 +0200
setupapi/tests: Test to show cleanup should not be needed.
---
dlls/setupapi/tests/devinst.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/dlls/setupapi/tests/devinst.c b/dlls/setupapi/tests/devinst.c
index 2e105fc..ec1542d 100644
--- a/dlls/setupapi/tests/devinst.c
+++ b/dlls/setupapi/tests/devinst.c
@@ -367,6 +367,12 @@ static void testCreateDeviceInfo(void)
{
BOOL ret;
HDEVINFO set;
+ HKEY key;
+ LONG res;
+ static const WCHAR bogus[] = {'S','y','s','t','e','m','\\',
+ 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\',
+ 'E','n','u','m','\\','R','o','o','t','\\',
+ 'L','E','G','A','C','Y','_','B','O','G','U','S',0};
if (!pSetupDiCreateDeviceInfoList || !pSetupDiEnumDeviceInfo ||
!pSetupDiDestroyDeviceInfoList || !pSetupDiCreateDeviceInfoA)
@@ -452,6 +458,17 @@ static void testCreateDeviceInfo(void)
"SetupDiEnumDeviceInfo failed: %08x\n", GetLastError());
pSetupDiDestroyDeviceInfoList(set);
}
+
+ res = RegOpenKeyW(HKEY_LOCAL_MACHINE, bogus, &key);
+ todo_wine
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected key to not exist\n");
+ /* FIXME: Remove when Wine is fixed */
+ if (res == ERROR_SUCCESS)
+ {
+ /* Wine doesn't delete the information currently */
+ trace("We are most likely on Wine\n");
+ RegDeleteKeyW(HKEY_LOCAL_MACHINE, bogus);
+ }
}
static void testGetDeviceInstanceId(void)
More information about the wine-cvs
mailing list