Generalize test to use regular expression to prevent false failure in rhino
git-svn-id: svn://10.0.0.236/trunk@171963 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
2f8521387d
commit
49783750da
@ -51,9 +51,15 @@ if (typeof uneval != 'undefined')
|
||||
b=function() {};
|
||||
}
|
||||
|
||||
expect = ' function a() { b = (function () {}); } ';
|
||||
var r = / function a\(\) \{ b = \(?function \(\) \{\s*\}\)?; \} /;
|
||||
eval(uneval(a));
|
||||
actual = a.toString().replace(/[ \n]+/g, ' ');
|
||||
|
||||
var v = a.toString().replace(/[ \n]+/g, ' ');
|
||||
|
||||
printStatus("[" + v + "]");
|
||||
|
||||
expect = true;
|
||||
actual = r.test(v);
|
||||
|
||||
reportCompare(expect, actual, summary);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user