ReactOS  0.4.15-dev-1397-g19779b3
PathIsUNC.c File Reference
#include <apitest.h>
#include <shlwapi.h>
Include dependency graph for PathIsUNC.c:

Go to the source code of this file.

Macros

#define DO_TEST(exp, str)
 

Functions

 START_TEST (isuncpath)
 

Macro Definition Documentation

◆ DO_TEST

#define DO_TEST (   exp,
  str 
)
Value:
do { \
BOOL ret = PathIsUNCW((str)); \
ok(ret == (exp), "Expected %s to be %d, was %d\n", wine_dbgstr_w((str)), (exp), ret); \
} while (0)
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: atltest.h:87
const WCHAR * str
int ret
DWORD exp
Definition: msg.c:16033
BOOL WINAPI PathIsUNCW(LPCWSTR lpszPath)
Definition: path.c:2245

Definition at line 24 of file PathIsUNC.c.

Function Documentation

◆ START_TEST()

START_TEST ( isuncpath  )

Definition at line 30 of file PathIsUNC.c.

31 {
32  DO_TEST(TRUE, L"\\\\path1\\path2");
33  DO_TEST(TRUE, L"\\\\path1");
34  DO_TEST(FALSE, L"reactos\\path4\\path5");
35  DO_TEST(TRUE, L"\\\\");
36  DO_TEST(TRUE, L"\\\\?\\UNC\\path1\\path2");
37  DO_TEST(TRUE, L"\\\\?\\UNC\\path1");
38  DO_TEST(TRUE, L"\\\\?\\UNC\\");
39  DO_TEST(FALSE, L"\\path1");
40  DO_TEST(FALSE, L"path1");
41  DO_TEST(FALSE, L"c:\\path1");
42 
43  /* MSDN says FALSE but the test shows TRUE on Windows 2003, but returns FALSE on Windows 7 */
44  DO_TEST(TRUE, L"\\\\?\\c:\\path1");
45 
46  DO_TEST(TRUE, L"\\\\path1\\");
47  DO_TEST(FALSE, L"//");
48  DO_TEST(FALSE, L"////path1");
49  DO_TEST(FALSE, L"////path1//path2");
50  DO_TEST(FALSE, L"reactos//path3//path4");
51  DO_TEST(TRUE, L"\\\\reactos\\?");
52  DO_TEST(TRUE, L"\\\\reactos\\\\");
53  DO_TEST(FALSE, (wchar_t*)NULL);
54  DO_TEST(FALSE, L" ");
55 
56  /* The test shows TRUE on Windows 2003, but returns FALSE on Windows 7 */
57  DO_TEST(TRUE, L"\\\\?\\");
58 }
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static const WCHAR L[]
Definition: oid.c:1250
#define NULL
Definition: types.h:112
#define DO_TEST(exp, str)
Definition: PathIsUNC.c:24