On Mon, Aug 31, 2020 at 05:33:58PM +1000, Alistair Leslie-Hughes wrote:
diff --git a/dlls/winmm/tests/mmio.c b/dlls/winmm/tests/mmio.c index e3984fbaf3..0de51a2562 100644 --- a/dlls/winmm/tests/mmio.c +++ b/dlls/winmm/tests/mmio.c @@ -478,6 +478,7 @@ static void test_mmioOpen_create(void) WCHAR cwd[MAX_PATH], temp_dir[MAX_PATH]; /* According to docs, filename must be no more than 128 bytes, but it will * actually allow longer than that. */
- WCHAR relpath[] = L"local\examplefile"; WCHAR filename[] = L"very_long_filename_" L"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" L"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
@@ -520,6 +521,14 @@ static void test_mmioOpen_create(void)
DeleteFileW(filename);
- CreateDirectoryA("local", NULL);
- hmmio = mmioOpenW(relpath, NULL, MMIO_CREATE | MMIO_WRITE | MMIO_EXCLUSIVE);
- ok(hmmio != NULL, "mmioOpen failed\n");
- mmioClose(hmmio, 0);
- DeleteFileW(relpath);
- RemoveDirectoryA("local");
- SetCurrentDirectoryW(cwd);
}
On my machine, this test passes without your changes to <dlls/winmm/mmio.c> applied. This is what I'd expect, CreateFile should find files that are relative to the CWD in the same was as SearchPath, so your patch is a no-op in this test case. I think you want to add a test showing that mmioOpen will open files elsewhere in the system path, or whatever it is that the game is depending on.
Andrew