[APPHELP_APITEST] Check which parts of apphelp accept NT paths

svn path=/trunk/; revision=74061
This commit is contained in:
Mark Jansen 2017-03-04 20:27:39 +00:00
parent 6c5070eb34
commit 985555c58f
2 changed files with 26 additions and 0 deletions

View file

@ -1148,6 +1148,7 @@ static void test_mode_generic(const char* workdir, HSDB hsdb, int cur)
TAGID tagid;
TAGREF trApphelp;
DWORD expect_flags = 0, adwExeFlags_0, exe_count;
UNICODE_STRING exenameNT;
memset(&query, 0xab, sizeof(query));
@ -1290,6 +1291,16 @@ static void test_mode_generic(const char* workdir, HSDB hsdb, int cur)
ok(pdb != NULL && pdb != (PDB)0x12345678, "Expected pdb to be set to a valid pdb, was: %p\n", pdb);
ok(tagid == 0, "Expected tagid to be set to 0, was: 0x%x\n", tagid);
if (RtlDosPathNameToNtPathName_U(exenameW, &exenameNT, NULL, NULL))
{
ret = pSdbGetMatchingExe(hsdb, exenameNT.Buffer, NULL, NULL, 0, (SDBQUERYRESULT*)&query);
ok(ret, "SdbGetMatchingExe should not fail for %d.\n", cur);
RtlFreeUnicodeString(&exenameNT);
}
if (test_exedata[cur].extra_file)
DeleteFileA(testfile);
DeleteFileA(exename);

View file

@ -141,6 +141,21 @@ void expect_Sdb_imp(PCSTR path, DWORD type, BOOL result, DWORD lenResult, PCSTR
}
WideCharToMultiByte(CP_ACP, 0, buffer, -1, resultBuffer, sizeof(resultBuffer), NULL, NULL);
winetest_ok(!strcmp(stringResult, resultBuffer), "Expected the result to be '%s', was '%s'\n", stringResult, resultBuffer);
if (result)
{
UNICODE_STRING pathNT;
if (RtlDosPathNameToNtPathName_U(pathW, &pathNT, NULL, NULL))
{
memset(buffer, 0, sizeof(buffer));
dwBufSize = sizeof(buffer);
winetest_ok(pSdbGetPermLayerKeys(pathNT.Buffer, buffer, &dwBufSize, type) == FALSE, "Expected pSdbGetPermLayerKeys to fail for NT path\n");
RtlFreeUnicodeString(&pathNT);
}
}
}