From kde-commits Sun Apr 20 08:11:22 2003 From: Peter Kelly Date: Sun, 20 Apr 2003 08:11:22 +0000 To: kde-commits Subject: khtmltests/js X-MARC-Message: https://marc.info/?l=kde-commits&m=105082628900323 CVS commit by pmk: added more tests for arrays, constructor function lengths and encodeURI()/decodeURI() A constructor_length.js 1.1 A encode_decode_uri.js 1.1 M +11 -0 Array.js 1.10 --- khtmltests/js/Array.js #1.9:1.10 @@ -112,2 +112,13 @@ shouldBe("arr.length","maxint"); shouldBe("arr[maxint-1]","\"test2\""); + +arr = new Array('a','b','c'); +arr.__proto__ = { 1: 'x' }; +var propnames = new Array(); +for (i in arr) + propnames.push(i); +propnames.sort(); +shouldBe("propnames.length","3"); +shouldBe("propnames[0]","'0'"); +shouldBe("propnames[1]","'1'"); +shouldBe("propnames[2]","'2'");