Commit 27003f83 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

dbghelp/tests: Use Unicode encoding for generated PDB filenames.

parent f8ee8790
......@@ -503,7 +503,7 @@ static void pdb_write(HANDLE hfile, struct pdb_file* pdb)
SetEndOfFile(hfile);
}
static BOOL create_test_pdb_ds(const char* pdb_name, const GUID* guid, DWORD age)
static BOOL create_test_pdb_ds(const WCHAR* pdb_name, const GUID* guid, DWORD age)
{
struct PDB_DS_ROOT root =
{
......@@ -660,8 +660,8 @@ static BOOL create_test_pdb_ds(const char* pdb_name, const GUID* guid, DWORD age
stream = pdb_add_stream(&pdb, &pddt.sections_stream, &ro_section, sizeof(ro_section));
hfile = CreateFileA(pdb_name, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, 0, 0);
ok(hfile != INVALID_HANDLE_VALUE, "failed to create %s err %lu\n", pdb_name, GetLastError());
hfile = CreateFileW(pdb_name, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, 0, 0);
ok(hfile != INVALID_HANDLE_VALUE, "failed to create %ls err %lu\n", pdb_name, GetLastError());
if (hfile == INVALID_HANDLE_VALUE) return FALSE;
pdb_write(hfile, &pdb);
......@@ -803,8 +803,8 @@ static void test_srvgetindexes_pe(void)
static void test_srvgetindexes_pdb(void)
{
unsigned int i;
char filename[128];
SYMSRV_INDEX_INFO ssii;
WCHAR filename[128];
SYMSRV_INDEX_INFOW ssii;
BOOL ret;
static struct
......@@ -822,12 +822,12 @@ static void test_srvgetindexes_pdb(void)
winetest_push_context("pdb#%02u", i);
/* create dll */
snprintf(filename, ARRAYSIZE(filename), "winetest%02u.pdb", i);
swprintf(filename, ARRAY_SIZE(filename), L"winetest%02u.pdb", i);
create_test_pdb_ds(filename, indexes[i].guid, 240 + i);
memset(&ssii, 0x45, sizeof(ssii));
ssii.sizeofstruct = sizeof(ssii);
ret = SymSrvGetFileIndexInfo(filename, &ssii, 0);
ret = SymSrvGetFileIndexInfoW(filename, &ssii, 0);
ok(ret, "SymSrvGetFileIndexInfo failed: %lu\n", GetLastError());
ok(ssii.age == 240 + i, "Mismatch in age: %lx\n", ssii.age);
......@@ -839,11 +839,11 @@ static void test_srvgetindexes_pdb(void)
ok(ssii.size == 0, "Mismatch in size: %lx\n", ssii.size);
ok(!ssii.stripped, "Mismatch in stripped: %x\n", ssii.stripped);
ok(ssii.timestamp == 0, "Mismatch in timestamp: %lx\n", ssii.timestamp);
ok(!strcmp(ssii.file, filename), "Mismatch in file: %s\n", ssii.file);
ok(!ssii.pdbfile[0], "Mismatch in pdbfile: %s\n", ssii.pdbfile);
ok(!ssii.dbgfile[0], "Mismatch in dbgfile: %s\n", ssii.dbgfile);
ok(!wcscmp(ssii.file, filename), "Mismatch in file: %ls\n", ssii.file);
ok(!ssii.pdbfile[0], "Mismatch in pdbfile: %ls\n", ssii.pdbfile);
ok(!ssii.dbgfile[0], "Mismatch in dbgfile: %ls\n", ssii.dbgfile);
DeleteFileA(filename);
DeleteFileW(filename);
winetest_pop_context();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment