зеркало из https://github.com/mozilla/gecko-dev.git
JavaScript Tests - update regression test for bug 274152 due to bug 368516, not part of the build
This commit is contained in:
Родитель
b7b5c6489e
Коммит
d56249d098
|
@ -54,16 +54,30 @@ function test()
|
|||
printStatus (summary);
|
||||
|
||||
expect = 'SyntaxError: illegal character';
|
||||
try
|
||||
{
|
||||
eval("hi\uFEFFthere = 'howdie';");
|
||||
}
|
||||
catch(ex)
|
||||
{
|
||||
actual = ex + '';
|
||||
}
|
||||
|
||||
reportCompare(expect, actual, summary);
|
||||
var formatcontrolchars = ['\u200C',
|
||||
'\u200D',
|
||||
'\u200E',
|
||||
'\u0600',
|
||||
'\u0601',
|
||||
'\u0602',
|
||||
'\u0603',
|
||||
'\u06DD',
|
||||
'\u070F'];
|
||||
|
||||
for (var i = 0; i < formatcontrolchars.length; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
eval("hi" + formatcontrolchars[i] + "there = 'howdie';");
|
||||
}
|
||||
catch(ex)
|
||||
{
|
||||
actual = ex + '';
|
||||
}
|
||||
|
||||
reportCompare(expect, actual, summary + ': ' + i);
|
||||
}
|
||||
|
||||
exitFunc ('test');
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче