Alex Villacís Lasso : user32: Tests for fix EM_SETLIMITTEXT with zeroed args.
Alexandre Julliard
julliard at winehq.org
Thu Oct 18 07:59:41 CDT 2007
Module: wine
Branch: master
Commit: c67d0122db53999d4b58a33209ee1e43de6327a9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c67d0122db53999d4b58a33209ee1e43de6327a9
Author: Alex Villacís Lasso <a_villacis at palosanto.com>
Date: Sun Oct 14 20:25:54 2007 -0500
user32: Tests for fix EM_SETLIMITTEXT with zeroed args.
---
dlls/user32/tests/edit.c | 33 ++++++++++++++++++++++++++++++++-
1 files changed, 32 insertions(+), 1 deletions(-)
diff --git a/dlls/user32/tests/edit.c b/dlls/user32/tests/edit.c
index c74f6d7..cd498cc 100644
--- a/dlls/user32/tests/edit.c
+++ b/dlls/user32/tests/edit.c
@@ -706,6 +706,36 @@ static void test_edit_control_5(void)
DestroyWindow(hWnd);
}
+static void test_edit_control_limittext(void)
+{
+ HWND hwEdit;
+ DWORD r;
+
+ /* Test default limit for single-line control */
+ trace("EDIT: buffer limit for single-line\n");
+ hwEdit = create_editcontrol(ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0);
+ r = SendMessage(hwEdit, EM_GETLIMITTEXT, 0, 0);
+ ok(r == 30000, "Incorrect default text limit, expected 30000 got %u\n", r);
+ SendMessage(hwEdit, EM_SETLIMITTEXT, 0, 0);
+ r = SendMessage(hwEdit, EM_GETLIMITTEXT, 0, 0);
+ /* Win9x+ME: 32766; WinNT: 2147483646UL */
+ ok( (r == 32766) || (r == 2147483646UL),
+ "got limit %u (expected 32766 or 2147483646)\n", r);
+ DestroyWindow(hwEdit);
+
+ /* Test default limit for multi-line control */
+ trace("EDIT: buffer limit for multi-line\n");
+ hwEdit = create_editcontrol(ES_MULTILINE | WS_VSCROLL | ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0);
+ r = SendMessage(hwEdit, EM_GETLIMITTEXT, 0, 0);
+ ok(r == 30000, "Incorrect default text limit, expected 30000 got %u\n", r);
+ SendMessage(hwEdit, EM_SETLIMITTEXT, 0, 0);
+ r = SendMessage(hwEdit, EM_GETLIMITTEXT, 0, 0);
+ /* Win9x+ME: 65535; WinNT: 4294967295UL */
+ ok( (r == 65535) || (r == 4294967295UL),
+ "got limit %u (expected 65535 or 4294967295)\n", r);
+ DestroyWindow(hwEdit);
+}
+
static void test_margins(void)
{
HWND hwEdit;
@@ -1139,7 +1169,7 @@ static BOOL RegisterWindowClasses (void)
text_position.cbWndExtra = 0;
text_position.hInstance = hinst;
text_position.hIcon = NULL;
- text_position.hCursor = LoadCursorA(NULL, MAKEINTRESOURCEA(IDC_ARROW));
+ text_position.hCursor = LoadCursorA(NULL, IDC_ARROW);
text_position.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
text_position.lpszMenuName = NULL;
text_position.lpszClassName = szEditTextPositionClass;
@@ -1166,6 +1196,7 @@ START_TEST(edit)
test_edit_control_3();
test_edit_control_4();
test_edit_control_5();
+ test_edit_control_limittext();
test_margins();
test_margins_font_change();
test_text_position();
More information about the wine-cvs
mailing list