reactos/modules/rostests/apitests/shlwapi/PathFileExistsDefExtAndAttributesW.c
Katayama Hirofumi MZ 0ff7e23ba8 improve 4
2024-05-13 16:46:18 +09:00

30 lines
881 B
C

/*
* PROJECT: ReactOS api tests
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
* PURPOSE: Tests for PathFileExistsDefExtAndAttributesW
* COPYRIGHT: Copyright 2024 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
*/
#include <apitest.h>
#include <shlobj.h>
#include <shlwapi.h>
#include <shlwapi_undoc.h>
START_TEST(PathFileExistsDefExtAndAttributesW)
{
WCHAR szPath[MAX_PATH];
DWORD attrs;
BOOL ret;
ret = PathFileExistsDefExtAndAttributesW(NULL, 0, NULL);
ok_int(ret, FALSE);
GetWindowsDirectoryW(szPath, _countof(szPath));
ret = PathFileExistsDefExtAndAttributesW(szPath, 0, NULL);
ok_int(ret, TRUE);
attrs = 0;
ret = PathFileExistsDefExtAndAttributesW(szPath, 0, &attrs);
ok_int(ret, TRUE);
ok(attrs != 0 && attrs != INVALID_FILE_ATTRIBUTES, "attrs was 0x%lX\n", attrs);
}