From ef269d5939f13bcdd3dd472fa0f194b9929f4513 Mon Sep 17 00:00:00 2001
From: bl0ckeduser <bl0ckedusersoft@gmail.com>
Date: Sat, 2 Feb 2013 10:49:25 -0500
Subject: [PATCH] Add test case for array prototype inheritance

See https://savannah.gnu.org/bugs/?38084, see also
commit df19f2f0cf0b996090faaff81827a073b600ad10
---
 testsuite/actionscript.all/array.as |   18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/testsuite/actionscript.all/array.as b/testsuite/actionscript.all/array.as
index 70c55a2..c1cc220 100644
--- a/testsuite/actionscript.all/array.as
+++ b/testsuite/actionscript.all/array.as
@@ -1680,6 +1680,17 @@ ret = "" + t.sort();
 check_equals(rescount, 0);
 check_equals(ret, "");
 
+// Check for correct array prototype inheritance
+// (see http://savannah.gnu.org/bugs/?38084)
+
+function X() { trace('X ctor'); }
+X.prototype = new Array();
+trace("creating new object");
+o = new X();
+o.push("Array data");
+ret = o.pop();
+xcheck_equals(ret, "Array data");
+
 #if OUTPUT_VERSION > 5
 
 Empty = function() {};
@@ -1783,13 +1794,12 @@ check_equals(ar.__proto__, "string");
 // ASnative(252, 12) - [Array.prototype] sortOn 
 //
 
-
 #if OUTPUT_VERSION < 6
- check_totals(549);
+ check_totals(550);
 #else
 # if OUTPUT_VERSION < 7
-  check_totals(633);
+  check_totals(634);
 # else
-  check_totals(643);
+  check_totals(644);
 # endif
 #endif
-- 
1.7.9.5

