910 int itemCount_justFiles;
911 int itemCount_justDrives;
912 int itemCount_allFiles;
913 int itemCount_allDirs;
918 const char *wildcard =
"*";
926 ok(
ret,
"Failed to set current directory.\n");
929 ok(
ret,
"Failed to create test directory.\n");
960 ok (itemCount > 0,
"SendMessage(LB_DIR) did NOT fill the listbox!\n");
961 itemCount_allFiles = itemCount;
962 ok(
res + 1 == itemCount,
963 "SendMessage(LB_DIR, 0, *) returned incorrect index (expected %d got %d)!\n",
974 ok (itemCount == 0,
"SendMessage(LB_DIR) DID fill the listbox!\n");
987 "expected no change to pathBuffer, got %s\n",
pathBuffer);
991 ok (itemCount > 0,
"SendMessage(LB_DIR) did NOT fill the listbox!\n");
992 itemCount_justFiles = itemCount;
993 ok(
res + 1 == itemCount,
994 "SendMessage(LB_DIR, 0, w*.c) returned incorrect index (expected %d got %d)!\n",
998 for (
i = 0;
i < itemCount;
i++) {
1003 (*(
p-1) ==
'c' || *(
p-1) ==
'C') &&
1004 (*(
p-2) ==
'.')),
"Element %d (%s) does not fit requested w*.c\n",
i,
pathBuffer);
1011 ok (
res > 0,
"SendMessage(LB_DIR, DDL_DIRECTORY, *) failed - 0x%08x\n",
GetLastError());
1017 itemCount_allDirs = itemCount - itemCount_allFiles;
1018 ok (itemCount > itemCount_allFiles,
1019 "SendMessage(LB_DIR, DDL_DIRECTORY, *) filled with %d entries, expected > %d\n",
1020 itemCount, itemCount_allFiles);
1021 ok(
res + 1 == itemCount,
1022 "SendMessage(LB_DIR, DDL_DIRECTORY, *) returned incorrect index (expected %d got %d)!\n",
1023 itemCount - 1,
res);
1029 ok (
res == -1,
"SendMessage(LB_DIR, DDL_DIRECTORY, %s) returned %d, expected -1\n",
BAD_EXTENSION,
res);
1033 ok (itemCount == 0,
"SendMessage(LB_DIR) DID fill the listbox!\n");
1040 ok (
res >= 0,
"SendMessage(LB_DIR, DDL_DIRECTORY, w*.c) failed - 0x%08x\n",
GetLastError());
1046 ok (itemCount == itemCount_justFiles,
1047 "SendMessage(LB_DIR, DDL_DIRECTORY, w*.c) filled with %d entries, expected %d\n",
1048 itemCount, itemCount_justFiles);
1049 ok(
res + 1 == itemCount,
1050 "SendMessage(LB_DIR, DDL_DIRECTORY, w*.c) returned incorrect index (expected %d got %d)!\n",
1051 itemCount - 1,
res);
1054 for (
i = 0;
i < itemCount;
i++) {
1060 (*(
p-1) ==
'c' || *(
p-1) ==
'C') &&
1061 (*(
p-2) ==
'.')),
"Element %d (%s) does not fit requested w*.c\n",
i,
pathBuffer);
1069 ok (
res >= 0,
"SendMessage(LB_DIR, DDL_DRIVES|DDL_EXCLUSIVE, *) failed - 0x%08x\n",
GetLastError());
1078 "SendMessage(LB_DIR, DDL_DRIVES|DDL_EXCLUSIVE, *) filled with %d entries, expected at least %d\n",
1080 itemCount_justDrives = itemCount;
1081 ok(
res + 1 == itemCount,
"SendMessage(LB_DIR, DDL_DRIVES|DDL_EXCLUSIVE, *) returned incorrect index!\n");
1084 for (
i = 0;
i < itemCount;
i++) {
1090 ok( driveletter >=
'a' && driveletter <=
'z',
"Drive letter not in range a..z, got ascii %d\n", driveletter);
1091 if (!(driveletter >=
'a' && driveletter <=
'z')) {
1094 itemCount_justDrives--;
1102 ok (
res == itemCount_justDrives -1,
"SendMessage(LB_DIR, DDL_DRIVES|DDL_EXCLUSIVE, %s) returned %d, expected %d\n",
1106 ok (itemCount == itemCount_justDrives,
"SendMessage(LB_DIR) returned %d expected %d\n",
1107 itemCount, itemCount_justDrives);
1109 trace(
"Files with w*.c: %d Mapped drives: %d Directories: 1\n",
1110 itemCount_justFiles, itemCount_justDrives);
1116 ok (
res > 0,
"SendMessage(LB_DIR, DDL_DRIVES, *) failed - 0x%08x\n",
GetLastError());
1124 ok (itemCount == itemCount_justDrives + itemCount_allFiles,
1125 "SendMessage(LB_DIR, DDL_DRIVES, *) filled with %d entries, expected %d\n",
1126 itemCount, itemCount_justDrives + itemCount_allFiles);
1127 ok(
res + 1 == itemCount,
"SendMessage(LB_DIR, DDL_DRIVES, *) returned incorrect index!\n");
1133 ok (
res == itemCount_justDrives -1,
"SendMessage(LB_DIR, DDL_DRIVES, %s) returned %d, expected %d\n",
1137 ok (itemCount ==
res + 1,
"SendMessage(LB_DIR) returned %d expected %d\n", itemCount,
res + 1);
1144 ok (
res > 0,
"SendMessage(LB_DIR, DDL_DRIVES, w*.c) failed - 0x%08x\n",
GetLastError());
1152 ok (itemCount == itemCount_justDrives + itemCount_justFiles,
1153 "SendMessage(LB_DIR, DDL_DRIVES, w*.c) filled with %d entries, expected %d\n",
1154 itemCount, itemCount_justDrives + itemCount_justFiles);
1155 ok(
res + 1 == itemCount,
"SendMessage(LB_DIR, DDL_DRIVES, w*.c) returned incorrect index!\n");
1158 for (
i = 0;
i < itemCount;
i++) {
1165 ok( driveletter >=
'a' && driveletter <=
'z',
"Drive letter not in range a..z, got ascii %d\n", driveletter);
1169 (*(
p-1) ==
'c' || *(
p-1) ==
'C') &&
1170 (*(
p-2) ==
'.')),
"Element %d (%s) does not fit requested w*.c\n",
i,
pathBuffer);
1179 ok (
res > 0,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES, *) failed - 0x%08x\n",
GetLastError());
1185 ok (itemCount == itemCount_allFiles + itemCount_justDrives + itemCount_allDirs,
1186 "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES) filled with %d entries, expected %d\n",
1187 itemCount, itemCount_allFiles + itemCount_justDrives + itemCount_allDirs);
1188 ok(
res + 1 == itemCount,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES, w*.c) returned incorrect index!\n");
1194 for (
i = 0;
i < itemCount;
i++) {
1199 ok( driveletter >=
'a' && driveletter <=
'z',
"Drive letter not in range a..z, got ascii %d\n", driveletter);
1207 ok (
res == itemCount_justDrives -1,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES, %s) returned %d, expected %d\n",
1211 ok (itemCount ==
res + 1,
"SendMessage(LB_DIR) returned %d expected %d\n", itemCount,
res + 1);
1219 ok (
res > 0,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES, w*.c) failed - 0x%08x\n",
GetLastError());
1225 ok (itemCount == itemCount_justFiles + itemCount_justDrives,
1226 "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES) filled with %d entries, expected %d\n",
1227 itemCount, itemCount_justFiles + itemCount_justDrives);
1228 ok(
res + 1 == itemCount,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES, w*.c) returned incorrect index!\n");
1234 for (
i = 0;
i < itemCount;
i++) {
1240 ok( driveletter >=
'a' && driveletter <=
'z',
"Drive letter not in range a..z, got ascii %d\n", driveletter);
1244 (*(
p-1) ==
'c' || *(
p-1) ==
'C') &&
1245 (*(
p-2) ==
'.')),
"Element %d (%s) does not fit requested w*.c\n",
i,
pathBuffer);
1253 ok (
res != -1,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err %u\n",
GetLastError());
1256 ok (itemCount == itemCount_allDirs,
1257 "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE) filled with %d entries, expected %d\n",
1258 itemCount, itemCount_allDirs);
1259 ok(
res + 1 == itemCount,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) returned incorrect index!\n");
1272 ok (
res == -1,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, %s) returned %d, expected %d\n",
1276 ok (itemCount ==
res + 1,
"SendMessage(LB_DIR) returned %d expected %d\n", itemCount,
res + 1);
1283 ok (
res ==
LB_ERR,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, w*.c) returned %d expected %d\n",
res,
LB_ERR);
1288 "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE) filled with %d entries, expected %d\n",
1295 ok (
res > 0,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, w*.c,) failed - 0x%08x\n",
GetLastError());
1299 ok (itemCount == itemCount_justDrives + itemCount_allDirs,
1300 "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE) filled with %d entries, expected %d\n",
1301 itemCount, itemCount_justDrives + itemCount_allDirs);
1302 ok(
res + 1 == itemCount,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, w*.c) returned incorrect index!\n");
1304 for (
i = 0;
i < itemCount;
i++) {
1309 ok( driveletter >=
'a' && driveletter <=
'z',
"Drive letter not in range a..z, got ascii %d\n", driveletter);
1312 "Element %d (%s) does not fit expected [...]\n",
i,
pathBuffer);
1320 ok (
res == itemCount_justDrives -1,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, %s) returned %d, expected %d\n",
1324 ok (itemCount ==
res + 1,
"SendMessage(LB_DIR) returned %d expected %d\n", itemCount,
res + 1);
1330 ok (
res >= 0,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, w*.c,) failed - 0x%08x\n",
GetLastError());
1334 ok (itemCount == itemCount_justDrives,
1335 "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE) filled with %d entries, expected %d\n",
1336 itemCount, itemCount_justDrives);
1337 ok(
res + 1 == itemCount,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, w*.c) returned incorrect index!\n");
1339 for (
i = 0;
i < itemCount;
i++) {
1344 ok( driveletter >=
'a' && driveletter <=
'z',
"Drive letter not in range a..z, got ascii %d\n", driveletter);
ACPI_SIZE strlen(const char *String)
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define INVALID_HANDLE_VALUE
DWORD WINAPI GetLastError(VOID)
BOOL WINAPI DestroyWindow(_In_ HWND)
static const char BAD_EXTENSION[]
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
BOOL WINAPI CreateDirectoryA(IN LPCSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
_Check_return_ _CRTIMP int __cdecl sscanf(_In_z_ const char *_Src, _In_z_ _Scanf_format_string_ const char *_Format,...)
#define FILE_ATTRIBUTE_NORMAL
BOOL WINAPI SetCurrentDirectoryA(IN LPCSTR lpPathName)
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
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
DWORD WINAPI GetCurrentDirectoryA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
BOOL WINAPI RemoveDirectoryA(IN LPCSTR lpPathName)
char * strcpy(char *DstString, const char *SrcString)
int strcmp(const char *String1, const char *String2)
#define CreateFileA(a, b, c, d, e, f, g)