ntdll/tests: Add tests to examine output file part pointer behavior for RtlGetFullPathName_U.
This commit is contained in:
parent
baaaee823f
commit
bdf583b349
|
@ -226,6 +226,9 @@ static void test_RtlIsNameLegalDOS8Dot3(void)
|
||||||
}
|
}
|
||||||
static void test_RtlGetFullPathName_U(void)
|
static void test_RtlGetFullPathName_U(void)
|
||||||
{
|
{
|
||||||
|
static const WCHAR emptyW[] = {0};
|
||||||
|
static const WCHAR deadbeefW[] = {'d','e','a','d','b','e','e','f',0};
|
||||||
|
|
||||||
struct test
|
struct test
|
||||||
{
|
{
|
||||||
const char *path;
|
const char *path;
|
||||||
|
@ -269,6 +272,26 @@ static void test_RtlGetFullPathName_U(void)
|
||||||
DWORD reslen;
|
DWORD reslen;
|
||||||
UINT len;
|
UINT len;
|
||||||
|
|
||||||
|
file_part = (WCHAR *)0xdeadbeef;
|
||||||
|
lstrcpyW(rbufferW, deadbeefW);
|
||||||
|
ret = pRtlGetFullPathName_U(NULL, MAX_PATH, rbufferW, &file_part);
|
||||||
|
ok(!ret, "Expected RtlGetFullPathName_U to return 0, got %u\n", ret);
|
||||||
|
ok(!lstrcmpW(rbufferW, deadbeefW),
|
||||||
|
"Expected the output buffer to be untouched, got %s\n", wine_dbgstr_w(rbufferW));
|
||||||
|
ok(file_part == (WCHAR *)0xdeadbeef ||
|
||||||
|
file_part == NULL, /* Win7 */
|
||||||
|
"Expected file part pointer to be untouched, got %p\n", file_part);
|
||||||
|
|
||||||
|
file_part = (WCHAR *)0xdeadbeef;
|
||||||
|
lstrcpyW(rbufferW, deadbeefW);
|
||||||
|
ret = pRtlGetFullPathName_U(emptyW, MAX_PATH, rbufferW, &file_part);
|
||||||
|
ok(!ret, "Expected RtlGetFullPathName_U to return 0, got %u\n", ret);
|
||||||
|
ok(!lstrcmpW(rbufferW, deadbeefW),
|
||||||
|
"Expected the output buffer to be untouched, got %s\n", wine_dbgstr_w(rbufferW));
|
||||||
|
ok(file_part == (WCHAR *)0xdeadbeef ||
|
||||||
|
file_part == NULL, /* Win7 */
|
||||||
|
"Expected file part pointer to be untouched, got %p\n", file_part);
|
||||||
|
|
||||||
for (test = tests; test->path; test++)
|
for (test = tests; test->path; test++)
|
||||||
{
|
{
|
||||||
len= strlen(test->rname) * sizeof(WCHAR);
|
len= strlen(test->rname) * sizeof(WCHAR);
|
||||||
|
|
Loading…
Reference in New Issue