Go to the source code of this file.
◆ BOOLEAN()
◆ DWORD()
◆ NTSTATUS()
◆ START_TEST()
Definition at line 377 of file path.c.
382 win_skip(
"Not running on NT, skipping tests\n");
388 pRtlDetermineDosPathNameType_U = (
void *)
GetProcAddress(
mod,
"RtlDetermineDosPathNameType_U");
390 pRtlOemStringToUnicodeString = (
void *)
GetProcAddress(
mod,
"RtlOemStringToUnicodeString");
393 pRtlDosPathNameToNtPathName_U_WithStatus = (
void *)
GetProcAddress(
mod,
"RtlDosPathNameToNtPathName_U_WithStatus");
static void test_RtlGetFullPathName_U(void)
static void test_RtlDosPathNameToNtPathName_U_WithStatus(void)
static void test_RtlIsNameLegalDOS8Dot3(void)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
static void test_RtlIsDosDeviceName_U(void)
#define GetProcAddress(x, y)
static WCHAR WCHAR **static UNICODE_STRING WCHAR CURDIR *static void test_RtlDetermineDosPathNameType_U(void)
◆ test_RtlDetermineDosPathNameType_U()
Definition at line 33 of file path.c.
78 if (!pRtlDetermineDosPathNameType_U)
80 win_skip(
"RtlDetermineDosPathNameType_U is not available\n");
87 ret = pRtlDetermineDosPathNameType_U(
buffer );
ACPI_SIZE strlen(const char *String)
static struct test_info tests[]
Referenced by START_TEST().
◆ test_RtlDosPathNameToNtPathName_U_WithStatus()
static void test_RtlDosPathNameToNtPathName_U_WithStatus |
( |
void |
| ) |
|
|
static |
Definition at line 348 of file path.c.
355 if (!pRtlDosPathNameToNtPathName_U_WithStatus)
357 win_skip(
"RtlDosPathNameToNtPathName_U_WithStatus() is not supported.\n");
368 "Unexpected status %#x.\n",
status);
372 "Unexpected status %#x.\n",
status);
static const WCHAR nameW[]
#define STATUS_OBJECT_PATH_NOT_FOUND
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
static const WCHAR emptyW[]
#define STATUS_OBJECT_NAME_INVALID
DWORD WINAPI GetCurrentDirectoryW(IN DWORD nBufferLength, OUT LPWSTR lpBuffer)
static SERVICE_STATUS status
Referenced by START_TEST().
◆ test_RtlGetFullPathName_U()
static void test_RtlGetFullPathName_U |
( |
void |
| ) |
|
|
static |
Definition at line 247 of file path.c.
250 static const WCHAR deadbeefW[] = {
'd',
'e',
'a',
'd',
'b',
'e',
'e',
'f',0};
257 const char *alt_rname;
258 const char *alt_rfile;
263 {
"c:/test",
"c:\\test",
"test"},
264 {
"c:/test ",
"c:\\test",
"test"},
265 {
"c:/test.",
"c:\\test",
"test"},
266 {
"c:/test .... .. ",
"c:\\test",
"test"},
267 {
"c:/test/ .... .. ",
"c:\\test\\",
NULL},
268 {
"c:/test/..",
"c:\\",
NULL},
269 {
"c:/test/.. ",
"c:\\test\\",
NULL},
270 {
"c:/TEST",
"c:\\TEST",
"TEST"},
271 {
"c:/test/file",
"c:\\test\\file",
"file"},
272 {
"c:/test./file",
"c:\\test\\file",
"file"},
273 {
"c:/test.. /file",
"c:\\test.. \\file",
"file"},
274 {
"c:/test/././file",
"c:\\test\\file",
"file"},
275 {
"c:/test\\.\\.\\file",
"c:\\test\\file",
"file"},
276 {
"c:/test/\\.\\.\\file",
"c:\\test\\file",
"file"},
277 {
"c:/test\\\\.\\.\\file",
"c:\\test\\file",
"file"},
278 {
"c:/test\\test1\\..\\.\\file",
"c:\\test\\file",
"file"},
279 {
"c:///test\\.\\.\\file//",
"c:\\test\\file\\",
NULL,
280 "c:\\test\\file",
"file"},
281 {
"c:///test\\..\\file\\..\\//",
"c:\\",
NULL},
282 {
"c:/test../file",
"c:\\test.\\file",
"file",
283 "c:\\test..\\file",
"file"},
284 {
"c:\\test",
"c:\\test",
"test"},
296 if (!pRtlGetFullPathName_U)
298 win_skip(
"RtlGetFullPathName_U is not available\n");
302 file_part = (
WCHAR *)0xdeadbeef;
305 ok(!
ret,
"Expected RtlGetFullPathName_U to return 0, got %u\n",
ret);
307 "Expected the output buffer to be untouched, got %s\n",
wine_dbgstr_w(rbufferW));
308 ok(file_part == (
WCHAR *)0xdeadbeef ||
310 "Expected file part pointer to be untouched, got %p\n", file_part);
312 file_part = (
WCHAR *)0xdeadbeef;
315 ok(!
ret,
"Expected RtlGetFullPathName_U to return 0, got %u\n",
ret);
317 "Expected the output buffer to be untouched, got %s\n",
wine_dbgstr_w(rbufferW));
318 ok(file_part == (
WCHAR *)0xdeadbeef ||
320 "Expected file part pointer to be untouched, got %p\n", file_part);
325 pRtlMultiByteToUnicodeN(pathbufW ,
sizeof(pathbufW),
NULL,
test->path,
strlen(
test->path)+1 );
326 ret = pRtlGetFullPathName_U( pathbufW,
MAX_PATH, rbufferW, &file_part);
328 "Wrong result %d/%d for \"%s\"\n",
ret,
len,
test->path );
330 "RtlUnicodeToMultiByteN failed\n");
332 "Got \"%s\" expected \"%s\"\n",rbufferA,
test->rname);
336 "RtlUnicodeToMultiByteN failed\n");
339 "Got \"%s\" expected \"%s\"\n",rfileA,
test->rfile);
343 ok( !
test->rfile,
"Got NULL expected \"%s\"\n",
test->rfile );
ACPI_SIZE strlen(const char *String)
char * wine_dbgstr_w(const wchar_t *wstr)
static struct test_info tests[]
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
int WINAPI lstrcmpA(LPCSTR lpString1, LPCSTR lpString2)
static DWORD LPDWORD reslen
static const WCHAR emptyW[]
Referenced by START_TEST().
◆ test_RtlIsDosDeviceName_U()
static void test_RtlIsDosDeviceName_U |
( |
void |
| ) |
|
|
static |
Definition at line 93 of file path.c.
105 {
"\\\\.\\CON", 8, 6,
TRUE },
106 {
"\\\\.\\con", 8, 6,
TRUE },
107 {
"\\\\.\\CON2", 0, 0 },
109 {
"\\\\foo\\nul", 0, 0 },
110 {
"c:\\nul:", 6, 6 },
111 {
"c:\\nul\\", 0, 0 },
112 {
"c:\\nul\\foo", 0, 0 },
113 {
"c:\\nul::", 6, 6,
TRUE },
114 {
"c:\\nul::::::", 6, 6,
TRUE },
116 {
"c:prn.......", 4, 6 },
117 {
"c:prn... ...", 4, 6 },
118 {
"c:NUL .... ", 4, 6,
TRUE },
119 {
"c: . . .", 0, 0 },
121 {
" . . . :", 0, 0 },
123 {
"c:nul. . . :", 4, 6 },
124 {
"c:nul . . :", 4, 6,
TRUE },
126 {
"c:prn:aaa", 4, 6,
TRUE },
127 {
"c:PRN:.txt", 4, 6 },
128 {
"c:aux:.txt...", 4, 6 },
129 {
"c:prn:.txt:", 4, 6 },
130 {
"c:nul:aaa", 4, 6,
TRUE },
136 {
"c:\\lpt0.txt", 0, 0 },
137 {
"c:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" 138 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" 139 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" 140 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" 141 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" 142 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" 143 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\nul.txt", 1000, 6 },
153 if (!pRtlIsDosDeviceName_U)
155 win_skip(
"RtlIsDosDeviceName_U is not available\n");
165 "Wrong result (%d,%d)/(%d,%d) for %s\n",
ACPI_SIZE strlen(const char *String)
static struct test_info tests[]
Referenced by START_TEST().
◆ test_RtlIsNameLegalDOS8Dot3()
static void test_RtlIsNameLegalDOS8Dot3 |
( |
void |
| ) |
|
|
static |
Definition at line 170 of file path.c.
183 {
"12345678.",
FALSE, 2 },
184 {
"1234 678.",
FALSE, 2 },
186 {
"12345678.a ",
FALSE, 2 },
188 {
" 2345678.a ",
FALSE, 2 },
191 {
"1 3 5 7 .abc",
FALSE, 2 },
193 {
"123456789.a",
FALSE, 2 },
194 {
"12345.abcd",
FALSE, 2 },
195 {
"12345.ab d",
FALSE, 2 },
196 {
".abc",
FALSE, 2 },
197 {
"12.abc.d",
FALSE, 2 },
201 {
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
FALSE, 2 },
212 if (!pRtlIsNameLegalDOS8Dot3)
214 win_skip(
"RtlIsNameLegalDOS8Dot3 is not available\n");
226 oem.MaximumLength = oem.Length + 1;
227 pRtlOemStringToUnicodeString( &ustr, &oem,
FALSE );
229 oem_ret.Length = oem_ret.MaximumLength =
sizeof(buff2);
230 oem_ret.Buffer = buff2;
231 ret = pRtlIsNameLegalDOS8Dot3( &ustr, &oem_ret, &spaces );
233 ok( spaces ==
test->spaces,
"Wrong spaces value %d/%d for '%s'\n", spaces,
test->spaces,
test->path );
240 ok( oem_ret.Length ==
strlen(
test->path),
"Wrong length %d/%d for '%s'\n",
242 ok( !
memcmp( oem_ret.Buffer,
str, oem_ret.Length ),
243 "Wrong string '%.*s'/'%s'\n", oem_ret.Length, oem_ret.Buffer,
str );
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
static struct test_info tests[]
int WINAPI lstrlenA(LPCSTR lpString)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
char * strcpy(char *DstString, const char *SrcString)
Referenced by START_TEST().
◆ UINT()
static UINT |
( |
WINAPI * |
pRtlDetermineDosPathNameType_U | ) |
|
|
static |
◆ ULONG()
◆ BOOLEAN
◆ dstlen
◆ DWORD
◆ LPCWSTR
◆ LPDWORD
◆ PBOOLEAN
◆ POEM_STRING
◆ reslen
◆ src
◆ srclen
◆ ULONG