[1/3] jscript: Properly handle \0 characters in String to{Lower,Upper}Case methods.

Jacek Caban jacek at codeweavers.com
Fri Sep 9 05:03:37 CDT 2016


On 08.09.2016 23:52, Sebastian Lackner wrote:
> diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js
> index c7f2bcd..e7b55fc 100644
> --- a/dlls/jscript/tests/api.js
> +++ b/dlls/jscript/tests/api.js
> @@ -661,6 +661,8 @@ tmp = "tEsT".toLowerCase();
>  ok(tmp === "test", "''.toLowerCase() = " + tmp);
>  tmp = "tEsT".toLowerCase(3);
>  ok(tmp === "test", "''.toLowerCase(3) = " + tmp);
> +tmp = ("tE" + String.fromCharCode(0) + "sT").toLowerCase();
> +ok(tmp === "te" + String.fromCharCode(0) + "st", "''.toLowerCase() = " + tmp);
>  
>  tmp = "".toUpperCase();
>  ok(tmp === "", "''.toUpperCase() = " + tmp);
> @@ -672,6 +674,8 @@ tmp = "tEsT".toUpperCase();
>  ok(tmp === "TEST", "''.toUpperCase() = " + tmp);
>  tmp = "tEsT".toUpperCase(3);
>  ok(tmp === "TEST", "''.toUpperCase(3) = " + tmp);
> +tmp = ("tE" + String.fromCharCode(0) + "sT").toUpperCase();
> +ok(tmp === "TE" + String.fromCharCode(0) + "ST", "''.toUpperCase() = " + tmp);
>  
>  tmp = "".anchor();
>  ok(tmp === "<A NAME=\"undefined\"></A>", "''.anchor() = " + tmp);

FWIW "\0" escape should work here, but that's fine with me.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>



More information about the wine-patches mailing list