Piotr Caban (@piotr) commented about dlls/msvcr80/tests/msvcr80.c:
- unsigned char buf[16];
- errno_t err;
- errno = 0xdeadbeef;
- memset(buf, 0xcc, sizeof(buf));
- err = p__mbsncpy_s(buf, 6, mbstring, 1);
- ok(errno == 0xdeadbeef, "Unexpected errno = %d\n", errno);
- ok(!err, "got %d.\n", err);
- if (mbcs)
- {
expect_bin(buf, "\xb0\xb1\0\xcc", 4);
- }
- else
- {
expect_bin(buf, "\xb0\0\xcc", 3);
- }
I think it is better to set the mbcodepage in the test.