"Fourth added which is very long because at some time we only had a 256 byte character buffer and that was overflowing in one of those applications that had a common dialog file open box and tried to add a 300 characters long custom filter string which of course the code did not like and crashed. Just make sure this string is longer than 256 characters."
};
-static const char BAD_EXTENSION[] = "*.txtbad";
+static const char BAD_EXTENSION[] = "*.badtxt";
static HWND
create_listbox (DWORD add_style, HWND parent)
{
HWND handle;
- int ctl_id=0;
+ INT_PTR ctl_id=0;
if (parent)
ctl_id=1;
handle=CreateWindow ("LISTBOX", "TestList",
parent, (HMENU)ctl_id, NULL, 0);
assert (handle);
- SendMessage (handle, LB_ADDSTRING, 0, (LPARAM) (LPCTSTR) strings[0]);
- SendMessage (handle, LB_ADDSTRING, 0, (LPARAM) (LPCTSTR) strings[1]);
- SendMessage (handle, LB_ADDSTRING, 0, (LPARAM) (LPCTSTR) strings[2]);
- SendMessage (handle, LB_ADDSTRING, 0, (LPARAM) (LPCTSTR) strings[3]);
+ SendMessage (handle, LB_ADDSTRING, 0, (LPARAM) strings[0]);
+ SendMessage (handle, LB_ADDSTRING, 0, (LPARAM) strings[1]);
+ SendMessage (handle, LB_ADDSTRING, 0, (LPARAM) strings[2]);
+ SendMessage (handle, LB_ADDSTRING, 0, (LPARAM) strings[3]);
#ifdef VISIBLE
ShowWindow (handle, SW_SHOW);
LPARAM lp=x+(y<<16);
WAIT;
- SendMessage (handle, WM_LBUTTONDOWN, (WPARAM) MK_LBUTTON, lp);
- SendMessage (handle, WM_LBUTTONUP , (WPARAM) 0 , lp);
+ SendMessage (handle, WM_LBUTTONDOWN, MK_LBUTTON, lp);
+ SendMessage (handle, WM_LBUTTONUP, 0, lp);
REDRAW;
}
rc_client.left, rc_client.top, rc_client.right, rc_client.bottom);
GetClipBox(dis->hDC, &rc_clip);
trace("clip rect (%d,%d-%d,%d)\n", rc_clip.left, rc_clip.top, rc_clip.right, rc_clip.bottom);
- ok(EqualRect(&rc_client, &rc_clip), "client rect of the listbox should be equal to the clip box\n");
+ ok(EqualRect(&rc_client, &rc_clip) || IsRectEmpty(&rc_clip),
+ "client rect of the listbox should be equal to the clip box,"
+ "or the clip box should be empty\n");
trace("rcItem (%d,%d-%d,%d)\n", dis->rcItem.left, dis->rcItem.top,
dis->rcItem.right, dis->rcItem.bottom);
cls.cbWndExtra = 0;
cls.hInstance = GetModuleHandle(0);
cls.hIcon = 0;
- cls.hCursor = LoadCursor(0, (LPSTR)IDC_ARROW);
+ cls.hCursor = LoadCursor(0, IDC_ARROW);
cls.hbrBackground = GetStockObject(WHITE_BRUSH);
cls.lpszMenuName = NULL;
cls.lpszClassName = "main_window_class";
hLB = create_listbox(LBS_OWNERDRAWFIXED | WS_CHILD | WS_VISIBLE, parent);
assert(hLB);
+ SetForegroundWindow(hLB);
UpdateWindow(hLB);
/* make height short enough */
HWND hList = CreateWindow( "ListBox", "list test",
WS_VISIBLE|WS_POPUP|LBS_NOINTEGRALHEIGHT,
1, 1, 600, 100, NULL, NULL, NULL, NULL );
- LONG r, id;
+ ULONG r, id;
RECT rc;
- /* For an empty listbox win2k returns 0x1ffff, win98 returns 0x10000 */
+ /* For an empty listbox win2k returns 0x1ffff, win98 returns 0x10000, nt4 returns 0xffffffff */
r = SendMessage(hList, LB_ITEMFROMPOINT, 0, MAKELPARAM( /* x */ 30, /* y */ 30 ));
- ok( r == 0x1ffff || r == 0x10000, "ret %x\n", r );
+ ok( r == 0x1ffff || r == 0x10000 || r == 0xffffffff, "ret %x\n", r );
r = SendMessage(hList, LB_ITEMFROMPOINT, 0, MAKELPARAM( 700, 30 ));
- ok( r == 0x1ffff || r == 0x10000, "ret %x\n", r );
+ ok( r == 0x1ffff || r == 0x10000 || r == 0xffffffff, "ret %x\n", r );
r = SendMessage(hList, LB_ITEMFROMPOINT, 0, MAKELPARAM( 30, 300 ));
- ok( r == 0x1ffff || r == 0x10000, "ret %x\n", r );
+ ok( r == 0x1ffff || r == 0x10000 || r == 0xffffffff, "ret %x\n", r );
id = SendMessage( hList, LB_ADDSTRING, 0, (LPARAM) "hi");
ok( id == 0, "item id wrong\n");
ok( r == 0x1, "ret %x\n", r );
r = SendMessage(hList, LB_ITEMFROMPOINT, 0, MAKELPARAM( /* x */ 30, /* y */ 601 ));
- ok( r == 0x10001, "ret %x\n", r );
+ ok( r == 0x10001 || broken(r == 1), /* nt4 */
+ "ret %x\n", r );
/* Resize control so that below assertions about sizes are valid */
r = SendMessage( hList, LB_GETITEMRECT, 0, (LPARAM)&rc);
ok( r == 1, "ret %x\n", r);
r = SendMessage( hList, LB_ITEMFROMPOINT, 0, MAKELPARAM(1000, 10) );
- ok( r == 0x10001, "ret %x\n", r );
+ ok( r == 0x10001 || broken(r == 1), /* nt4 */
+ "ret %x\n", r );
r = SendMessage( hList, LB_ITEMFROMPOINT, 0, MAKELPARAM(10, -10) );
- ok( r == 0x10001, "ret %x\n", r );
+ ok( r == 0x10001 || broken(r == 1), /* nt4 */
+ "ret %x\n", r );
r = SendMessage( hList, LB_ITEMFROMPOINT, 0, MAKELPARAM(10, 100) );
- ok( r == 0x10005, "item %x\n", r );
+ ok( r == 0x10005 || broken(r == 5), /* nt4 */
+ "item %x\n", r );
r = SendMessage( hList, LB_ITEMFROMPOINT, 0, MAKELPARAM(10, 200) );
- ok( r == 0x10005, "item %x\n", r );
+ ok( r == 0x10005 || broken(r == 5), /* nt4 */
+ "item %x\n", r );
DestroyWindow( hList );
}
DestroyWindow( hList );
}
-static void test_listbox_LB_DIR()
+static void test_listbox_LB_DIR(void)
{
HWND hList;
int res, itemCount;
int itemCount_justFiles;
int itemCount_justDrives;
int itemCount_allFiles;
+ int itemCount_allDirs;
int i;
char pathBuffer[MAX_PATH];
char * p;
char driveletter;
+ const char *wildcard = "*";
HANDLE file;
file = CreateFileA( "wtest1.tmp.c", GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL );
/* Test for standard usage */
/* This should list all the files in the test directory. */
- strcpy(pathBuffer, "*");
+ strcpy(pathBuffer, wildcard);
SendMessage(hList, LB_RESETCONTENT, 0, 0);
res = SendMessage(hList, LB_DIR, 0, (LPARAM)pathBuffer);
+ if (res == -1) /* "*" wildcard doesn't work on win9x */
+ {
+ wildcard = "*.*";
+ strcpy(pathBuffer, wildcard);
+ res = SendMessage(hList, LB_DIR, 0, (LPARAM)pathBuffer);
+ }
ok (res >= 0, "SendMessage(LB_DIR, 0, *) failed - 0x%08x\n", GetLastError());
/* There should be some content in the listbox */
}
/* Test DDL_DIRECTORY */
- strcpy(pathBuffer, "*");
+ strcpy(pathBuffer, wildcard);
SendMessage(hList, LB_RESETCONTENT, 0, 0);
res = SendMessage(hList, LB_DIR, DDL_DIRECTORY, (LPARAM)pathBuffer);
ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY, *) failed - 0x%08x\n", GetLastError());
* All files plus "[..]"
*/
itemCount = SendMessage(hList, LB_GETCOUNT, 0, 0);
- ok (itemCount == itemCount_allFiles + 1,
- "SendMessage(LB_DIR, DDL_DIRECTORY, *) filled with %d entries, expected %d\n",
- itemCount, itemCount_allFiles + 1);
+ itemCount_allDirs = itemCount - itemCount_allFiles;
+ ok (itemCount > itemCount_allFiles,
+ "SendMessage(LB_DIR, DDL_DIRECTORY, *) filled with %d entries, expected > %d\n",
+ itemCount, itemCount_allFiles);
ok(res + 1 == itemCount,
"SendMessage(LB_DIR, DDL_DIRECTORY, *) returned incorrect index (expected %d got %d)!\n",
itemCount - 1, res);
/* Test DDL_DRIVES|DDL_EXCLUSIVE */
- strcpy(pathBuffer, "*");
+ strcpy(pathBuffer, wildcard);
SendMessage(hList, LB_RESETCONTENT, 0, 0);
res = SendMessage(hList, LB_DIR, DDL_DRIVES|DDL_EXCLUSIVE, (LPARAM)pathBuffer);
- ok (res > 0, "SendMessage(LB_DIR, DDL_DRIVES|DDL_EXCLUSIVE, *) failed - 0x%08x\n", GetLastError());
+ ok (res >= 0, "SendMessage(LB_DIR, DDL_DRIVES|DDL_EXCLUSIVE, *) failed - 0x%08x\n", GetLastError());
/* There should be some content in the listbox. In particular, there should
* be at least one element before, since the string "[-c-]" should
itemCount_justFiles, itemCount_justDrives);
/* Test DDL_DRIVES. */
- strcpy(pathBuffer, "*");
+ strcpy(pathBuffer, wildcard);
SendMessage(hList, LB_RESETCONTENT, 0, 0);
res = SendMessage(hList, LB_DIR, DDL_DRIVES, (LPARAM)pathBuffer);
ok (res > 0, "SendMessage(LB_DIR, DDL_DRIVES, *) failed - 0x%08x\n", GetLastError());
*/
itemCount = SendMessage(hList, LB_GETCOUNT, 0, 0);
ok (itemCount == itemCount_justDrives + itemCount_allFiles,
- "SendMessage(LB_DIR, DDL_DRIVES, w*.c) filled with %d entries, expected %d\n",
+ "SendMessage(LB_DIR, DDL_DRIVES, *) filled with %d entries, expected %d\n",
itemCount, itemCount_justDrives + itemCount_allFiles);
- ok(res + 1 == itemCount, "SendMessage(LB_DIR, DDL_DRIVES, w*.c) returned incorrect index!\n");
+ ok(res + 1 == itemCount, "SendMessage(LB_DIR, DDL_DRIVES, *) returned incorrect index!\n");
/* This tests behavior when no files match the wildcard */
strcpy(pathBuffer, BAD_EXTENSION);
/* Test DDL_DIRECTORY|DDL_DRIVES. This does *not* imply DDL_EXCLUSIVE */
- strcpy(pathBuffer, "*");
+ strcpy(pathBuffer, wildcard);
SendMessage(hList, LB_RESETCONTENT, 0, 0);
res = SendMessage(hList, LB_DIR, DDL_DIRECTORY|DDL_DRIVES, (LPARAM)pathBuffer);
ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES, *) failed - 0x%08x\n", GetLastError());
* be exactly the number of plain files, plus the number of mapped drives.
*/
itemCount = SendMessage(hList, LB_GETCOUNT, 0, 0);
- ok (itemCount == itemCount_allFiles + itemCount_justDrives + 1,
+ ok (itemCount == itemCount_allFiles + itemCount_justDrives + itemCount_allDirs,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES) filled with %d entries, expected %d\n",
- itemCount, itemCount_allFiles + itemCount_justDrives + 1);
+ itemCount, itemCount_allFiles + itemCount_justDrives + itemCount_allDirs);
ok(res + 1 == itemCount, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES, w*.c) returned incorrect index!\n");
/* Every single item in the control should start with a w and end in .c,
}
/* Test DDL_DIRECTORY|DDL_EXCLUSIVE. */
- strcpy(pathBuffer, "*");
+ strcpy(pathBuffer, wildcard);
SendMessage(hList, LB_RESETCONTENT, 0, 0);
res = SendMessage(hList, LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, (LPARAM)pathBuffer);
- ok (res == 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed - 0x%08x\n", GetLastError());
+ ok (res != -1, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) failed err %u\n", GetLastError());
- /* There should be exactly one element: "[..]" */
itemCount = SendMessage(hList, LB_GETCOUNT, 0, 0);
- ok (itemCount == 1,
+ ok (itemCount == itemCount_allDirs,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE) filled with %d entries, expected %d\n",
- itemCount, 1);
+ itemCount, itemCount_allDirs);
ok(res + 1 == itemCount, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_EXCLUSIVE, *) returned incorrect index!\n");
- memset(pathBuffer, 0, MAX_PATH);
- SendMessage(hList, LB_GETTEXT, 0, (LPARAM)pathBuffer);
- ok( !strcmp(pathBuffer, "[..]"), "First (and only) element is not [..]\n");
+ if (itemCount && GetCurrentDirectoryA( MAX_PATH, pathBuffer ) > 3) /* there's no [..] in drive root */
+ {
+ memset(pathBuffer, 0, MAX_PATH);
+ SendMessage(hList, LB_GETTEXT, 0, (LPARAM)pathBuffer);
+ ok( !strcmp(pathBuffer, "[..]"), "First element is not [..]\n");
+ }
/* This tests behavior when no files match the wildcard */
strcpy(pathBuffer, BAD_EXTENSION);
itemCount, 0);
/* Test DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE. */
- strcpy(pathBuffer, "*");
+ strcpy(pathBuffer, wildcard);
SendMessage(hList, LB_RESETCONTENT, 0, 0);
res = SendMessage(hList, LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, (LPARAM)pathBuffer);
ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, w*.c,) failed - 0x%08x\n", GetLastError());
/* There should be no plain files on the listbox */
itemCount = SendMessage(hList, LB_GETCOUNT, 0, 0);
- ok (itemCount == itemCount_justDrives + 1,
+ ok (itemCount == itemCount_justDrives + itemCount_allDirs,
"SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE) filled with %d entries, expected %d\n",
- itemCount, itemCount_justDrives + 1);
+ itemCount, itemCount_justDrives + itemCount_allDirs);
ok(res + 1 == itemCount, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, w*.c) returned incorrect index!\n");
for (i = 0; i < itemCount; i++) {
if (sscanf(pathBuffer, "[-%c-]", &driveletter) == 1) {
ok( driveletter >= 'a' && driveletter <= 'z', "Drive letter not in range a..z, got ascii %d\n", driveletter);
} else {
- ok( !strcmp(pathBuffer, "[..]"), "Element %d (%s) does not fit expected [..]\n", i, pathBuffer);
+ ok( pathBuffer[0] == '[' && pathBuffer[strlen(pathBuffer)-1] == ']',
+ "Element %d (%s) does not fit expected [...]\n", i, pathBuffer);
}
}
strcpy(pathBuffer, "w*.c");
SendMessage(hList, LB_RESETCONTENT, 0, 0);
res = SendMessage(hList, LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, (LPARAM)pathBuffer);
- ok (res > 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, w*.c,) failed - 0x%08x\n", GetLastError());
+ ok (res >= 0, "SendMessage(LB_DIR, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE, w*.c,) failed - 0x%08x\n", GetLastError());
/* There should be no plain files on the listbox, and no [..], since it does not fit w*.c */
itemCount = SendMessage(hList, LB_GETCOUNT, 0, 0);
HINSTANCE hInst;
HWND hWnd;
int res, itemCount;
+ int itemCount_allDirs;
int itemCount_justFiles;
int itemCount_justDrives;
int i;
ok (res == 1, "DlgDirList(*.c, DDL_DIRECTORY) failed - 0x%08x\n", GetLastError());
/* There should be some content in the listbox. In particular, there should
- * be exactly one more element than before, since the string "[..]" should
+ * be exactly more elements than before, since the directories should
* have been added.
*/
itemCount = SendMessage(g_listBox, LB_GETCOUNT, 0, 0);
- ok (itemCount == itemCount_justFiles + 1,
- "DlgDirList(DDL_DIRECTORY) filled with %d entries, expected %d\n",
- itemCount, itemCount_justFiles + 1);
+ itemCount_allDirs = itemCount - itemCount_justFiles;
+ ok (itemCount >= itemCount_justFiles,
+ "DlgDirList(DDL_DIRECTORY) filled with %d entries, expected > %d\n",
+ itemCount, itemCount_justFiles);
/* Every single item in the control should start with a w and end in .c,
* except for the "[..]" string, which should appear exactly as it is.
memset(pathBuffer, 0, MAX_PATH);
SendMessage(g_listBox, LB_GETTEXT, i, (LPARAM)pathBuffer);
p = pathBuffer + strlen(pathBuffer);
- ok( !strcmp(pathBuffer, "[..]") ||
+ ok( (pathBuffer[0] == '[' && pathBuffer[strlen(pathBuffer)-1] == ']') ||
((pathBuffer[0] == 'w' || pathBuffer[0] == 'W') &&
(*(p-1) == 'c' || *(p-1) == 'C') &&
(*(p-2) == '.')), "Element %d (%s) does not fit requested w*.c\n", i, pathBuffer);
ok (res == 1, "DlgDirList(%s, DDL_DIRECTORY) returned %d expected 1\n", BAD_EXTENSION, res);
itemCount = SendMessage(g_listBox, LB_GETCOUNT, 0, 0);
- ok (itemCount == 1, "DlgDirList() incorrectly filled the listbox! (expected 1 got %d)\n",
- itemCount);
+ ok (itemCount == itemCount_allDirs,
+ "DlgDirList() incorrectly filled the listbox! (expected %d got %d)\n",
+ itemCount_allDirs, itemCount);
for (i = 0; i < itemCount; i++) {
memset(pathBuffer, 0, MAX_PATH);
SendMessage(g_listBox, LB_GETTEXT, i, (LPARAM)pathBuffer);
p = pathBuffer + strlen(pathBuffer);
- ok( !strcmp(pathBuffer, "[..]"), "Element %d (%s) does not fit requested [..]\n", i, pathBuffer);
+ ok( pathBuffer[0] == '[' && pathBuffer[strlen(pathBuffer)-1] == ']',
+ "Element %d (%s) does not fit requested [...]\n", i, pathBuffer);
}
* plus one "[..]"
*/
itemCount = SendMessage(g_listBox, LB_GETCOUNT, 0, 0);
- ok (itemCount == itemCount_justFiles + itemCount_justDrives + 1,
+ ok (itemCount == itemCount_justFiles + itemCount_justDrives + itemCount_allDirs,
"DlgDirList(DDL_DIRECTORY|DDL_DRIVES) filled with %d entries, expected %d\n",
- itemCount, itemCount_justFiles + itemCount_justDrives + 1);
+ itemCount, itemCount_justFiles + itemCount_justDrives + itemCount_allDirs);
/* Every single item in the control should start with a w and end in .c,
* except for the "[..]" string, which should appear exactly as it is,
if (sscanf(pathBuffer, "[-%c-]", &driveletter) == 1) {
ok( driveletter >= 'a' && driveletter <= 'z', "Drive letter not in range a..z, got ascii %d\n", driveletter);
} else {
- ok( !strcmp(pathBuffer, "[..]") ||
+ ok( (pathBuffer[0] == '[' && pathBuffer[strlen(pathBuffer)-1] == ']') ||
((pathBuffer[0] == 'w' || pathBuffer[0] == 'W') &&
(*(p-1) == 'c' || *(p-1) == 'C') &&
(*(p-2) == '.')), "Element %d (%s) does not fit requested w*.c\n", i, pathBuffer);
ok (res == 1, "DlgDirList(%s, DDL_DIRECTORY|DDL_DRIVES) returned %d expected 1\n", BAD_EXTENSION, res);
itemCount = SendMessage(g_listBox, LB_GETCOUNT, 0, 0);
- ok (itemCount == itemCount_justDrives + 1,
+ ok (itemCount == itemCount_justDrives + itemCount_allDirs,
"DlgDirList() incorrectly filled the listbox! (expected %d got %d)\n",
- itemCount_justDrives + 1, itemCount);
+ itemCount_justDrives + itemCount_allDirs, itemCount);
/* There should be exactly one element: "[..]" */
itemCount = SendMessage(g_listBox, LB_GETCOUNT, 0, 0);
- ok (itemCount == 1,
+ ok (itemCount == itemCount_allDirs,
"DlgDirList(DDL_DIRECTORY|DDL_EXCLUSIVE) filled with %d entries, expected %d\n",
- itemCount, 1);
-
- memset(pathBuffer, 0, MAX_PATH);
- SendMessage(g_listBox, LB_GETTEXT, 0, (LPARAM)pathBuffer);
- ok( !strcmp(pathBuffer, "[..]"), "First (and only) element is not [..]\n");
+ itemCount, itemCount_allDirs);
+ if (itemCount && GetCurrentDirectoryA( MAX_PATH, pathBuffer ) > 3) /* there's no [..] in drive root */
+ {
+ memset(pathBuffer, 0, MAX_PATH);
+ SendMessage(g_listBox, LB_GETTEXT, 0, (LPARAM)pathBuffer);
+ ok( !strcmp(pathBuffer, "[..]"), "First (and only) element is not [..]\n");
+ }
/* Test behavior when no files match the wildcard */
strcpy(pathBuffer, BAD_EXTENSION);
ok (res == 1, "DlgDirList(%s, DDL_DIRECTORY|DDL_EXCLUSIVE) returned %d expected 1\n", BAD_EXTENSION, res);
itemCount = SendMessage(g_listBox, LB_GETCOUNT, 0, 0);
- ok (itemCount == 1, "DlgDirList() incorrectly filled the listbox!\n");
+ ok (itemCount == itemCount_allDirs, "DlgDirList() incorrectly filled the listbox!\n");
/* Test DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE. */
/* There should be no plain files on the listbox */
itemCount = SendMessage(g_listBox, LB_GETCOUNT, 0, 0);
- ok (itemCount == itemCount_justDrives + 1,
+ ok (itemCount == itemCount_justDrives + itemCount_allDirs,
"DlgDirList(DDL_DIRECTORY|DDL_EXCLUSIVE) filled with %d entries, expected %d\n",
- itemCount, itemCount_justDrives + 1);
+ itemCount, itemCount_justDrives + itemCount_allDirs);
for (i = 0; i < itemCount; i++) {
memset(pathBuffer, 0, MAX_PATH);
if (sscanf(pathBuffer, "[-%c-]", &driveletter) == 1) {
ok( driveletter >= 'a' && driveletter <= 'z', "Drive letter not in range a..z, got ascii %d\n", driveletter);
} else {
- ok( !strcmp(pathBuffer, "[..]"), "Element %d (%s) does not fit expected [..]\n", i, pathBuffer);
+ ok( pathBuffer[0] == '[' && pathBuffer[strlen(pathBuffer)-1] == ']',
+ "Element %d (%s) does not fit expected [...]\n", i, pathBuffer);
}
}
ok (res == 1, "DlgDirList(%s, DDL_DIRECTORY|DDL_DRIVES|DDL_EXCLUSIVE) returned %d expected 1\n", BAD_EXTENSION, res);
itemCount = SendMessage(g_listBox, LB_GETCOUNT, 0, 0);
- ok (itemCount == itemCount_justDrives + 1, "DlgDirList() incorrectly filled the listbox!\n");
+ ok (itemCount == itemCount_justDrives + itemCount_allDirs,
+ "DlgDirList() incorrectly filled the listbox!\n");
/* Now test DlgDirSelectEx() in normal operation */