JavaScript Test - regression test for bug 352013
authorbclary@bclary.com
Tue, 03 Apr 2007 03:07:19 -0700
changeset 285 45382079bd3ff62accbe7465a149db395b8c157e
parent 284 68fd53d7ec2285307e4ce9aef9be06cfa24d074d
child 286 512bd8893eef5ddcdfe5abc8f6d65018e0f7799d
push idunknown
push userunknown
push dateunknown
bugs352013
milestone1.9a4pre
JavaScript Test - regression test for bug 352013
js/tests/js1_5/Regress/regress-352013.js
--- a/js/tests/js1_5/Regress/regress-352013.js
+++ b/js/tests/js1_5/Regress/regress-352013.js
@@ -46,17 +46,17 @@ test();
 //-----------------------------------------------------------------------------
 
 function test()
 {
   enterFunc ('test');
   printBugNumber (bug);
   printStatus (summary);
 
-  var f, g;
+  var f, g, h;
   var x = Function;
   var z = 'actual += arguments[0];';
   var w = 42;
 
   f = function() { new (x(z))(w) }
   expect = 'function() { new (x(z))(w); }';
   actual = f + '';
   compareSource(expect, actual, summary);
@@ -67,10 +67,25 @@ function test()
   compareSource(expect, actual, summary);
 
   expect = '4242';
   actual = '';
   f();
   g();
   reportCompare(expect, actual, summary);
 
+  h = function () { new (x(y)(z));  }
+  expect = 'function () { new (x(y)(z)); }';
+  actual = h + '';
+  compareSource(expect, actual, summary);
+
+  h = function () { new (x(y).z);   }
+  expect = 'function () { new (x(y).z); }';
+  actual = h + '';
+  compareSource(expect, actual, summary);
+
+  h = function () { new x(y).z;   }
+  expect = 'function () { (new x(y)).z; }';
+  actual = h + '';
+  compareSource(expect, actual, summary);
+
   exitFunc ('test');
 }