34 if (
Length != ExpectedLength)
49 ok(0,
"Not null terminated\n");
59 ok(0,
"Found 0x%x at offset %lu, expected 0x%x\n", Char, (
ULONG)
i, 0);
114 { __LINE__,
L"\\\\.\\Something\\",
PrefixNone,
L"\\\\.\\Something\\" },
124 { __LINE__,
L"\\\\??\\C:\\",
PrefixNone,
L"\\\\??\\C:\\" },
126 { __LINE__,
L"\\\\??\\C:\\test\\",
PrefixNone,
L"\\\\??\\C:\\test\\" },
133 SIZE_T ExpectedFilePartSize;
138 for (
i = 0;
i < TestCount;
i++)
156 skip(
"Invalid test!\n");
160 RtlFillMemory(FullPathNameBuffer,
sizeof(FullPathNameBuffer), 0xAA);
164 sizeof(FullPathNameBuffer),
170 ok(Okay,
"Line %lu: Wrong path name '%S', expected '%S'\n",
TestCases[
i].
Line, FullPathNameBuffer, ExpectedPathName);
175 FilePartSize =
ShortName - FullPathNameBuffer;
180 ExpectedFilePartSize = 0;
183 ExpectedFilePartSize =
sizeof(
L"C:\\");
187 if (ExpectedFilePartSize ==
sizeof(
L"C:\\"))
188 ExpectedFilePartSize -=
sizeof(
WCHAR);
195 if (ExpectedFilePartSize ==
sizeof(
L"C:\\"))
196 ExpectedFilePartSize = 0;
203 ok(0,
"Line %lu: GetCurrentDirectory returned %S\n",
TestCases[
i].
Line, CurrentPath);
208 skip(
"Invalid test!\n");
211 ExpectedFilePartSize +=
TestCases[
i].FilePartSize;
212 if (ExpectedFilePartSize != 0)
213 ExpectedFilePartSize = (ExpectedFilePartSize -
sizeof(
UNICODE_NULL)) /
sizeof(
WCHAR);
214 ok(FilePartSize == ExpectedFilePartSize,
215 "Line %lu: FilePartSize = %lu, expected %lu\n",
TestCases[
i].
Line, (
ULONG)FilePartSize, (
ULONG)ExpectedFilePartSize);
static TEST_CASE TestCases[]
@ PrefixCurrentPathWithoutLastPart
static VOID RunTestCases(VOID)
static BOOLEAN CheckStringBuffer(PCWSTR Buffer, SIZE_T Length, SIZE_T MaximumLength, PCWSTR Expected)
#define EndSeh(ExpectedStatus)
#define GetCurrentDirectoryW(x, y)
static const WCHAR BackSlash[]
#define RtlCompareMemory(s1, s2, l)
IN PDCB IN POEM_STRING IN PUNICODE_STRING IN OUT POEM_STRING ShortName
struct _FileName FileName
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
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define RtlFillMemory(Dest, Length, Fill)
NTSYSAPI ULONG NTAPI RtlGetFullPathName_U(_In_ PCWSTR FileName, _In_ ULONG Size, _Out_z_bytecap_(Size) PWSTR Buffer, _Out_opt_ PWSTR *ShortName)
_In_ ULONG _In_ ULONG _In_ ULONG Length
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_In_ WDFDMATRANSACTION _In_ size_t MaximumLength
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO