[SHELL32_APITEST] Follow-up of 83e690c

Forgotten the section numbers.
CORE-18080
This commit is contained in:
Katayama Hirofumi MZ 2022-11-01 09:05:24 +09:00
parent 83e690cd92
commit 6fe0a082ec

View file

@ -436,7 +436,7 @@ CreateShortcut(LPCWSTR pszLnkFileName,
} }
static BOOL static BOOL
CreateRegAppPath(INT LineNumber, const WCHAR* Name, const WCHAR* Value) CreateRegAppPath(INT SectionNumber, INT LineNumber, const WCHAR* Name, const WCHAR* Value)
{ {
HKEY RegistryKey; HKEY RegistryKey;
LONG Result; LONG Result;
@ -449,13 +449,15 @@ CreateRegAppPath(INT LineNumber, const WCHAR* Name, const WCHAR* Value)
0, KEY_WRITE, NULL, &RegistryKey, &Disposition); 0, KEY_WRITE, NULL, &RegistryKey, &Disposition);
if (Result != ERROR_SUCCESS) if (Result != ERROR_SUCCESS)
{ {
trace("#%d: Could not create test key. Status: %lu\n", LineNumber, Result); trace("Section %d, Line %d: Could not create test key. Status: %lu\n",
SectionNumber, LineNumber, Result);
return FALSE; return FALSE;
} }
Result = RegSetValueW(RegistryKey, NULL, REG_SZ, Value, 0); Result = RegSetValueW(RegistryKey, NULL, REG_SZ, Value, 0);
if (Result != ERROR_SUCCESS) if (Result != ERROR_SUCCESS)
{ {
trace("#%d: Could not set value of the test key. Status: %lu\n", LineNumber, Result); trace("Section %d, Line %d: Could not set value of the test key. Status: %lu\n",
SectionNumber, LineNumber, Result);
RegCloseKey(RegistryKey); RegCloseKey(RegistryKey);
return FALSE; return FALSE;
} }
@ -464,7 +466,7 @@ CreateRegAppPath(INT LineNumber, const WCHAR* Name, const WCHAR* Value)
} }
static BOOL static BOOL
DeleteRegAppPath(INT LineNumber, const WCHAR* Name) DeleteRegAppPath(INT SectionNumber, INT LineNumber, const WCHAR* Name)
{ {
LONG Result; LONG Result;
WCHAR Buffer[1024]; WCHAR Buffer[1024];
@ -473,7 +475,8 @@ DeleteRegAppPath(INT LineNumber, const WCHAR* Name)
Result = RegDeleteKeyW(HKEY_LOCAL_MACHINE, Buffer); Result = RegDeleteKeyW(HKEY_LOCAL_MACHINE, Buffer);
if (Result != ERROR_SUCCESS) if (Result != ERROR_SUCCESS)
{ {
trace("#%d: Could not remove the test key. Status: %lu\n", LineNumber, Result); trace("Section %d, Line %d: Could not remove the test key. Status: %lu\n",
SectionNumber, LineNumber, Result);
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
@ -526,7 +529,7 @@ static void DoEntry(INT SectionNumber, INT LineNumber, const TEST_ENTRY *pEntry)
if (pEntry->EF_ & EF_APP_PATH) if (pEntry->EF_ & EF_APP_PATH)
{ {
if (!CreateRegAppPath(LineNumber, pEntry->NameBefore, PathExpected)) if (!CreateRegAppPath(SectionNumber, LineNumber, pEntry->NameBefore, PathExpected))
{ {
skip("Section %d, Line %d: CreateRegAppPath failure\n", SectionNumber, LineNumber); skip("Section %d, Line %d: CreateRegAppPath failure\n", SectionNumber, LineNumber);
return; return;
@ -555,7 +558,7 @@ static void DoEntry(INT SectionNumber, INT LineNumber, const TEST_ENTRY *pEntry)
if (pEntry->EF_ & EF_APP_PATH) if (pEntry->EF_ & EF_APP_PATH)
{ {
ok(DeleteRegAppPath(LineNumber, pEntry->NameBefore), ok(DeleteRegAppPath(SectionNumber, LineNumber, pEntry->NameBefore),
"Section %d, Line %d: DeleteRegAppPath failed\n", SectionNumber, LineNumber); "Section %d, Line %d: DeleteRegAppPath failed\n", SectionNumber, LineNumber);
} }