Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/user32/tests/listbox.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
diff --git a/dlls/user32/tests/listbox.c b/dlls/user32/tests/listbox.c index 4d9e70f..5259f29 100644 --- a/dlls/user32/tests/listbox.c +++ b/dlls/user32/tests/listbox.c @@ -1721,6 +1721,26 @@ static void test_set_count( void ) DestroyWindow( parent ); }
+static void test_nodata_invalid_styles( void ) +{ + static const DWORD style[] = + { + 0, LBS_OWNERDRAWVARIABLE, LBS_SORT, LBS_HASSTRINGS, + LBS_OWNERDRAWFIXED | LBS_SORT, LBS_OWNERDRAWFIXED | LBS_HASSTRINGS + }; + HWND parent, listbox; + UINT i; + + parent = create_parent(); + for (i = 0; i < ARRAY_SIZE(style); i++) + { + listbox = create_listbox(style[i] | LBS_NODATA | WS_CHILD | WS_VISIBLE, parent); + ok(SendMessageA(listbox, LB_SETCOUNT, 100, 0) == LB_ERR, "LBS_NODATA enabled with incompatible styles 0x%X\n", style[i]); + DestroyWindow(listbox); + } + DestroyWindow(parent); +} + static DWORD (WINAPI *pGetListBoxInfo)(HWND); static int lb_getlistboxinfo;
@@ -2067,6 +2087,7 @@ START_TEST(listbox) test_listbox_LB_DIR(); test_listbox_dlgdir(); test_set_count(); + test_nodata_invalid_styles(); test_GetListBoxInfo(); test_missing_lbuttonup(); test_extents();