From 2a6119814a2425940d69efd392d3d1cae55ccf0a Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Tue, 14 Jan 2020 15:50:08 +0100 Subject: [PATCH] jscript/tests: Use wide char string literals instead of parse_htmlscript_a. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- dlls/jscript/tests/run.c | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/dlls/jscript/tests/run.c b/dlls/jscript/tests/run.c index 76b0bdae87a..1862a3334d5 100644 --- a/dlls/jscript/tests/run.c +++ b/dlls/jscript/tests/run.c @@ -1918,7 +1918,7 @@ static HRESULT invoke_procedure(const char *argsa, const char *sourcea, DISPPARA return hres; } -static HRESULT parse_htmlscript(BSTR script_str) +static HRESULT parse_htmlscript(const WCHAR *script_str) { IActiveScriptParse *parser; IActiveScript *engine; @@ -2130,16 +2130,6 @@ static void parse_script_ae(const char *src, HRESULT exhres) ok(hres == exhres, "parse_script failed: %08x, expected %08x\n", hres, exhres); } -static HRESULT parse_htmlscript_a(const char *src) -{ - HRESULT hres; - BSTR tmp = a2bstr(src); - hres = parse_htmlscript(tmp); - SysFreeString(tmp); - - return hres; -} - static BSTR get_script_from_file(const char *filename) { DWORD size, len; @@ -3085,17 +3075,17 @@ static BOOL run_tests(void) parse_script_af(0, "test.testThis2(this);"); parse_script_af(0, "(function () { test.testThis2(this); })();"); - hres = parse_htmlscript_a(""); + hres = parse_htmlscript(L"-->"); ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); - hres = parse_htmlscript_a("\n"); + hres = parse_htmlscript(L"\n"); ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); - hres = parse_htmlscript_a("\n"); + hres = parse_htmlscript(L"\n"); ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); - hres = parse_htmlscript_a("var a=1;\nif(a-->0) a=5;\n"); + hres = parse_htmlscript(L"var a=1;\nif(a-->0) a=5;\n"); ok(hres == S_OK, "ParseScriptText failed: %08x\n", hres); - hres = parse_htmlscript_a("var a=1;\nif(a\n-->0) a=5;\n"); + hres = parse_htmlscript(L"var a=1;\nif(a\n-->0) a=5;\n"); ok(hres != S_OK, "ParseScriptText have not failed\n"); test_script_exprs();