зеркало из https://github.com/mozilla/pjs.git
JavaScript Tests - update regression test for bug 274152 due to bug 368516, not part of the build
This commit is contained in:
Родитель
83b1ef8ae6
Коммит
7074b03a17
|
@ -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');
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче