Commit e7296eae authored by Alex Villacís Lasso's avatar Alex Villacís Lasso Committed by Alexandre Julliard

riched20: Fix test crash on WinXP-SP2.

parent 17e93466
......@@ -1087,6 +1087,8 @@ static void test_EM_SETTEXTEX(void)
getText.codepage = 1200; /* no constant for unicode */
getText.cb = MAX_BUF_LEN;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
setText.flags = 0;
SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem1);
......@@ -1101,6 +1103,8 @@ static void test_EM_SETTEXTEX(void)
getText.codepage = 1200; /* no constant for unicode */
getText.cb = MAX_BUF_LEN;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
setText.flags = 0;
SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem2);
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf);
......@@ -1117,6 +1121,8 @@ static void test_EM_SETTEXTEX(void)
getText.codepage = 1200; /* no constant for unicode */
getText.cb = MAX_BUF_LEN;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
setText.flags = 0;
SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem3);
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf);
......@@ -1128,6 +1134,8 @@ static void test_EM_SETTEXTEX(void)
getText.codepage = 1200; /* no constant for unicode */
getText.cb = MAX_BUF_LEN;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
setText.flags = 0;
SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem3alt);
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf);
......@@ -1139,6 +1147,8 @@ static void test_EM_SETTEXTEX(void)
getText.codepage = 1200; /* no constant for unicode */
getText.cb = MAX_BUF_LEN;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
setText.flags = 0;
SendMessage(hwndRichEdit, EM_SETTEXTEX, (WPARAM)&setText, (LPARAM) TestItem4);
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buf);
......@@ -1747,6 +1757,8 @@ static void test_EM_REPLACESEL(void)
getText.cb = 1024;
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "RichEdit1") == 0,
"EM_GETTEXTEX results not what was set by EM_REPLACESEL\n");
......@@ -1760,6 +1772,8 @@ static void test_EM_REPLACESEL(void)
getText.cb = 1024;
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "RichEdit1\r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
......@@ -1779,6 +1793,8 @@ static void test_EM_REPLACESEL(void)
getText.cb = 1024;
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "RichEdit1\r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
......@@ -1805,6 +1821,8 @@ static void test_EM_REPLACESEL(void)
getText.cb = 1024;
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "\r\r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
......@@ -1821,6 +1839,8 @@ static void test_EM_REPLACESEL(void)
getText.cb = 1024;
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, " ") == 0,
"EM_GETTEXTEX returned incorrect string\n");
......@@ -1837,6 +1857,8 @@ static void test_EM_REPLACESEL(void)
getText.cb = 1024;
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "\r\r\r \r\r\r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
......@@ -1853,6 +1875,8 @@ static void test_EM_REPLACESEL(void)
getText.cb = 1024;
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, " \r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
......@@ -1869,6 +1893,8 @@ static void test_EM_REPLACESEL(void)
getText.cb = 1024;
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, " \r\r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
......@@ -1885,6 +1911,8 @@ static void test_EM_REPLACESEL(void)
getText.cb = 1024;
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "\rX\r\r\r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
......@@ -1901,6 +1929,8 @@ static void test_EM_REPLACESEL(void)
getText.cb = 1024;
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "\r\r") == 0,
"EM_GETTEXTEX returned incorrect string\n");
......@@ -1917,6 +1947,8 @@ static void test_EM_REPLACESEL(void)
getText.cb = 1024;
getText.codepage = CP_ACP;
getText.flags = GT_DEFAULT;
getText.lpDefaultChar = NULL;
getText.lpUsedDefaultChar = NULL;
SendMessage(hwndRichEdit, EM_GETTEXTEX, (WPARAM)&getText, (LPARAM) buffer);
ok(strcmp(buffer, "\r\r\r\r\r\r ") == 0,
"EM_GETTEXTEX returned incorrect string\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment