Module: wine Branch: master Commit: d5bd667390adfede12ad93979f94eb641496cbf7 URL: https://source.winehq.org/git/wine.git/?a=commit;h=d5bd667390adfede12ad93979...
Author: Jacek Caban jacek@codeweavers.com Date: Tue Jan 28 16:41:37 2020 +0100
mshtml/tests: Get rid of strstr_wa.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/mshtml/tests/style.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-)
diff --git a/dlls/mshtml/tests/style.c b/dlls/mshtml/tests/style.c index 37a1426270..ac898dffca 100644 --- a/dlls/mshtml/tests/style.c +++ b/dlls/mshtml/tests/style.c @@ -81,22 +81,6 @@ static BSTR a2bstr(const char *str) return ret; }
-static const WCHAR *strstr_wa(const WCHAR *str, const char *suba) -{ - BSTR sub; - const WCHAR *ret = NULL; - sub = a2bstr(suba); - while (*str) - { - const WCHAR *p1 = str, *p2 = sub; - while (*p1 && *p2 && *p1 == *p2) { p1++; p2++; } - if (!*p2) {ret = str; break;} - str++; - } - SysFreeString(sub); - return ret; -} - #define test_var_bstr(a,b) _test_var_bstr(__LINE__,a,b) static void _test_var_bstr(unsigned line, const VARIANT *v, const char *expect) { @@ -2920,14 +2904,13 @@ static void test_body_style(IHTMLStyle *style) if (hres != E_INVALIDARG) { hres = IHTMLStyle_get_listStyle(style, &str); ok(hres == S_OK, "get_listStyle failed: %08x\n", hres); - ok(strstr_wa(str, "decimal-leading-zero") && - strstr_wa(str, "inside") != NULL, + ok(wcsstr(str, L"decimal-leading-zero") && wcsstr(str, L"inside"), "listStyle = %s\n", wine_dbgstr_w(str)); if(compat_mode < COMPAT_IE9) - ok(strstr_wa(str, "none") != NULL, "listStyle = %s\n", wine_dbgstr_w(str)); + ok(wcsstr(str, L"none") != NULL, "listStyle = %s\n", wine_dbgstr_w(str)); else todo_wine - ok(!strstr_wa(str, "none"), "listStyle = %s\n", wine_dbgstr_w(str)); + ok(!wcsstr(str, L"none"), "listStyle = %s\n", wine_dbgstr_w(str));
SysFreeString(str); } else {