Nikolay Sivov : comctl32/tests: A bit more tests for partial strings in LVM_FINDITEM.
Alexandre Julliard
julliard at winehq.org
Mon May 22 15:54:03 CDT 2017
Module: wine
Branch: master
Commit: d05b351fe0d7ad57549dd6df8220f6ebb612fb12
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d05b351fe0d7ad57549dd6df8220f6ebb612fb12
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Mon May 22 00:09:40 2017 +0300
comctl32/tests: A bit more tests for partial strings in LVM_FINDITEM.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/comctl32/tests/listview.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c
index 471f9f7..4bc95bb 100644
--- a/dlls/comctl32/tests/listview.c
+++ b/dlls/comctl32/tests/listview.c
@@ -5055,12 +5055,30 @@ static void test_finditem(void)
fi.psz = f;
r = SendMessageA(hwnd, LVM_FINDITEMA, -1, (LPARAM)&fi);
expect(0, r);
+
+ fi.flags = LVFI_STRING | LVFI_PARTIAL;
+ r = SendMessageA(hwnd, LVM_FINDITEMA, -1, (LPARAM)&fi);
+ expect(0, r);
+
+ fi.flags = LVFI_PARTIAL;
+ r = SendMessageA(hwnd, LVM_FINDITEMA, -1, (LPARAM)&fi);
+ expect(0, r);
+
/* partial string search, inserted text was "foo" */
strcpy(f, "fo");
fi.flags = LVFI_STRING | LVFI_PARTIAL;
fi.psz = f;
r = SendMessageA(hwnd, LVM_FINDITEMA, -1, (LPARAM)&fi);
expect(0, r);
+
+ fi.flags = LVFI_STRING;
+ r = SendMessageA(hwnd, LVM_FINDITEMA, -1, (LPARAM)&fi);
+ expect(-1, r);
+
+ fi.flags = LVFI_PARTIAL;
+ r = SendMessageA(hwnd, LVM_FINDITEMA, -1, (LPARAM)&fi);
+ expect(0, r);
+
/* partial string search, part after start char */
strcpy(f, "oo");
fi.flags = LVFI_STRING | LVFI_PARTIAL;
@@ -5091,12 +5109,22 @@ static void test_finditem(void)
r = SendMessageA(hwnd, LVM_FINDITEMA, -1, (LPARAM)&fi);
expect(-1, r);
+ strcpy(f, "o");
+ fi.flags = LVFI_SUBSTRING | LVFI_PARTIAL;
+ fi.psz = f;
+ r = SendMessageA(hwnd, LVM_FINDITEMA, -1, (LPARAM)&fi);
+ expect(-1, r);
+
strcpy(f, "f");
fi.flags = LVFI_SUBSTRING | LVFI_STRING;
fi.psz = f;
r = SendMessageA(hwnd, LVM_FINDITEMA, -1, (LPARAM)&fi);
expect(0, r);
+ fi.flags = LVFI_SUBSTRING | LVFI_PARTIAL;
+ r = SendMessageA(hwnd, LVM_FINDITEMA, -1, (LPARAM)&fi);
+ expect(0, r);
+
DestroyWindow(hwnd);
}
More information about the wine-cvs
mailing list