[RFC PATCH 1/2] kernel32: Move implementation of {Get,Write}PrivateProfileStringW() to helper.

Dmitry Timoshkov dmitry at baikal.ru
Tue Apr 23 04:10:22 CDT 2019


Jactry Zeng <jzeng at codeweavers.com> wrote:

> > That is certainly wrong. Very first thing to do (as usual) is to add
> > a test case demonstarting the issue.
> There are some tests in [2/2].

These tests are either not convincing or broken:

+    lstrcpyA(expected_val, "\xe9\x85\x92\x2e");
+    len = MultiByteToWideChar(CP_ACP, 0, expected_val, -1, expected_valW, MAX_PATH) - 1;

You should not rely on CP_ACP being compatible with the multibyte string.

+    ret = GetPrivateProfileStringW(section_schineseW, name5W, NULL,
+                                   bufW, MAX_PATH, filenameW);
+    ok(ret == len ||
+       (ret == 0 && bufW[0] == '\0') /* non-English */, "Expected %d, got %d\n", len, ret);

A test that sometimes fails is broken.

-- 
Dmitry.



More information about the wine-devel mailing list