ReactOS 0.4.16-dev-1946-g52006dd
PathIsTemporary.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS API Tests
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: Tests for PathIsTemporaryA/W
5 * COPYRIGHT: Copyright 2023 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
6 */
7
8#include "shelltest.h"
9#include <undocshell.h>
10
11static void Test_PathIsTemporaryA(void)
12{
15 ok_int(PathIsTemporaryA("C:\\TestTestTest"), FALSE);
16
19
22
24 {
25 /* This is not reliable on Vista+ */
26 PathAppendA(szPath, "TestTestTest");
28 }
29
32
34}
35
36static void Test_PathIsTemporaryW(void)
37{
40 ok_int(PathIsTemporaryW(L"C:\\TestTestTest"), FALSE);
41
44
47
49 {
50 /* This is not reliable on Vista+ */
51 PathAppendW(szPath, L"TestTestTest");
53 }
54
57
59}
60
61START_TEST(PathIsTemporary)
62{
65}
static void Test_PathIsTemporaryW(void)
static void Test_PathIsTemporaryA(void)
#define START_TEST(x)
Definition: atltest.h:75
#define ok_int(expression, result)
Definition: atltest.h:134
#define _WIN32_WINNT
Definition: precomp.h:14
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define MAX_PATH
Definition: compat.h:34
BOOL WINAPI RemoveDirectoryA(IN LPCSTR lpPathName)
Definition: dir.c:714
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
Definition: dir.c:90
BOOL WINAPI RemoveDirectoryW(IN LPCWSTR lpPathName)
Definition: dir.c:732
BOOL WINAPI CreateDirectoryA(IN LPCSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
Definition: dir.c:37
DWORD WINAPI GetTempPathW(IN DWORD count, OUT LPWSTR path)
Definition: path.c:2080
UINT WINAPI GetWindowsDirectoryA(OUT LPSTR lpBuffer, IN UINT uSize)
Definition: path.c:2337
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2352
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
Definition: path.c:2054
#define L(x)
Definition: resources.c:13
LPCWSTR szPath
Definition: env.c:37
#define PathAppendA
Definition: pathcch.h:309
#define PathAppendW
Definition: pathcch.h:310
#define _WIN32_WINNT_WS03
Definition: sdkddkver.h:23
BOOL WINAPI PathIsTemporaryW(LPWSTR Str)
Definition: shellord.c:2150
BOOL WINAPI PathIsTemporaryA(LPSTR Str)
Definition: shellord.c:2127
#define _countof(array)
Definition: sndvol32.h:70
__wchar_t WCHAR
Definition: xmlstorage.h:180
char CHAR
Definition: xmlstorage.h:175