From 48202ee09ea0ab7a93920252276e3bf8cc170888 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Wed, 29 Dec 2010 16:01:56 +0100 Subject: [PATCH] jscript: Don't unescape '\v'. --- dlls/jscript/lex.c | 3 --- dlls/jscript/tests/lang.js | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/dlls/jscript/lex.c b/dlls/jscript/lex.c index 0329fa473b2..723f0ef7ed9 100644 --- a/dlls/jscript/lex.c +++ b/dlls/jscript/lex.c @@ -266,9 +266,6 @@ static BOOL unescape(WCHAR *str) case 'n': c = '\n'; break; - case 'v': - c = '\v'; - break; case 'f': c = '\f'; break; diff --git a/dlls/jscript/tests/lang.js b/dlls/jscript/tests/lang.js index bdf039a1021..5a361d756f8 100644 --- a/dlls/jscript/tests/lang.js +++ b/dlls/jscript/tests/lang.js @@ -942,6 +942,30 @@ ok((Infinity != NaN) === true, "(Infinity != NaN) !== true"); ok((Infinity != NaN) === true, "(Infinity != NaN) !== true"); ok((0 == NaN) === false, "(0 === NaN) != false"); +// escape tests +var escapeTests = [ + ["\'", "\\'", 39], + ["\"", "\\\"", 34], + ["\\", "\\\\", 92], + ["\b", "\\b", 8], + ["\t", "\\t", 9], + ["\n", "\\n", 10], + ["\v", "\\v", 118], + ["\f", "\\f", 12], + ["\r", "\\r", 13], + ["\xf3", "\\xf3", 0xf3], + ["\u1234", "\\u1234", 0x1234], + ["\a", "\\a", 97], + ["\?", "\\?", 63] +]; + +for(i=0; i