summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/ch14
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/ch14')
-rw-r--r--js/src/tests/test262/ch14/14.0/S14_A1.js35
-rw-r--r--js/src/tests/test262/ch14/14.0/S14_A2.js31
-rw-r--r--js/src/tests/test262/ch14/14.0/S14_A3.js30
-rw-r--r--js/src/tests/test262/ch14/14.0/S14_A5_T1.js22
-rw-r--r--js/src/tests/test262/ch14/14.0/S14_A5_T2.js21
-rw-r--r--js/src/tests/test262/ch14/14.0/browser.js0
-rw-r--r--js/src/tests/test262/ch14/14.0/shell.js0
-rw-r--r--js/src/tests/test262/ch14/14.1/14.1-1-s.js23
-rw-r--r--js/src/tests/test262/ch14/14.1/14.1-10-s.js24
-rw-r--r--js/src/tests/test262/ch14/14.1/14.1-11-s.js26
-rw-r--r--js/src/tests/test262/ch14/14.1/14.1-12-s.js24
-rw-r--r--js/src/tests/test262/ch14/14.1/14.1-13-s.js23
-rw-r--r--js/src/tests/test262/ch14/14.1/14.1-14-s.js24
-rw-r--r--js/src/tests/test262/ch14/14.1/14.1-15-s.js29
-rw-r--r--js/src/tests/test262/ch14/14.1/14.1-16-s.js23
-rw-r--r--js/src/tests/test262/ch14/14.1/14.1-17-s.js23
-rw-r--r--js/src/tests/test262/ch14/14.1/14.1-2-s.js23
-rw-r--r--js/src/tests/test262/ch14/14.1/14.1-3-s.js23
-rw-r--r--js/src/tests/test262/ch14/14.1/14.1-4-s.js24
-rw-r--r--js/src/tests/test262/ch14/14.1/14.1-4gs.js14
-rw-r--r--js/src/tests/test262/ch14/14.1/14.1-5-s.js23
-rw-r--r--js/src/tests/test262/ch14/14.1/14.1-5gs.js16
-rw-r--r--js/src/tests/test262/ch14/14.1/14.1-6-s.js23
-rw-r--r--js/src/tests/test262/ch14/14.1/14.1-7-s.js23
-rw-r--r--js/src/tests/test262/ch14/14.1/14.1-8-s.js24
-rw-r--r--js/src/tests/test262/ch14/14.1/14.1-9-s.js24
-rw-r--r--js/src/tests/test262/ch14/14.1/browser.js0
-rw-r--r--js/src/tests/test262/ch14/14.1/shell.js0
-rw-r--r--js/src/tests/test262/ch14/browser.js0
-rw-r--r--js/src/tests/test262/ch14/shell.js0
30 files changed, 575 insertions, 0 deletions
diff --git a/js/src/tests/test262/ch14/14.0/S14_A1.js b/js/src/tests/test262/ch14/14.0/S14_A1.js
new file mode 100644
index 000000000..302db12dd
--- /dev/null
+++ b/js/src/tests/test262/ch14/14.0/S14_A1.js
@@ -0,0 +1,35 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * FunctionExpression must be localed in a reacheable fragment of the program
+ *
+ * @path ch14/14.0/S14_A1.js
+ * @description Declaring a function within an "if" Expression
+ */
+
+var THERE = "I'm there";
+var HERE = "I'm here";
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if ( __func !== undefined) {
+ $ERROR('#1: __func === undefined. Actual: __func ==='+ __func );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+if (true){
+ var __func = function(){return HERE;};
+} else {
+ var __func = function (){return THERE;};
+};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__func() !== HERE) {
+ $ERROR('#2: __func() === HERE. Actual: __func() ==='+ __func() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
diff --git a/js/src/tests/test262/ch14/14.0/S14_A2.js b/js/src/tests/test262/ch14/14.0/S14_A2.js
new file mode 100644
index 000000000..758e6daf5
--- /dev/null
+++ b/js/src/tests/test262/ch14/14.0/S14_A2.js
@@ -0,0 +1,31 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * FunctionDeclaration cannot be localed inside an Expression
+ *
+ * @path ch14/14.0/S14_A2.js
+ * @description Declaring a function within an "if" Expression
+ */
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (typeof f !== 'undefined') {
+ $ERROR('#1: typeof f === \'undefined\'. Actual: typeof f ==='+ typeof f );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (function f(arg){
+ if (arg===0)
+ return 1;
+ else
+ return f(arg-1)*arg;
+}(3)!==6) {
+ $ERROR('#2: FunctionDeclaration cannot be localed inside an Expression');
+};
+//
+//////////////////////////////////////////////////////////////////////////////
+
diff --git a/js/src/tests/test262/ch14/14.0/S14_A3.js b/js/src/tests/test262/ch14/14.0/S14_A3.js
new file mode 100644
index 000000000..d7dff69a6
--- /dev/null
+++ b/js/src/tests/test262/ch14/14.0/S14_A3.js
@@ -0,0 +1,30 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * Global FunctionDeclaration cannot be defined within the body of another FunctionDeclaration
+ *
+ * @path ch14/14.0/S14_A3.js
+ * @description Declaring a function within the body of another function
+ */
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (typeof __func !== "function") {
+ $ERROR('#1: typeof __func === "function". Actual: typeof __func ==='+ typeof __func );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (typeof __gunc !== "undefined") {
+ $ERROR('#2: typeof __gunc === "undefined". Actual: typeof __gunc ==='+ typeof __gunc );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+function __func(){
+ function __gunc(){return true};
+}
+
diff --git a/js/src/tests/test262/ch14/14.0/S14_A5_T1.js b/js/src/tests/test262/ch14/14.0/S14_A5_T1.js
new file mode 100644
index 000000000..499147150
--- /dev/null
+++ b/js/src/tests/test262/ch14/14.0/S14_A5_T1.js
@@ -0,0 +1,22 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * The Identifer within a FunctionDeclaration can be written in both letters and unicode
+ *
+ * @path ch14/14.0/S14_A5_T1.js
+ * @description Declaring a function with "function __\u0066\u0075\u006e\u0063(){return "both"}"
+ */
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__func() !== "both") {
+ $ERROR('#1: __func() === "both". Actual: __func() ==='+ __func() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+function __func(){return "ascii"};
+function \u005f\u005f\u0066\u0075\u006e\u0063(){return "unicode"};//__func in unicode
+function __\u0066\u0075\u006e\u0063(){return "both"};//__func in unicode
+
diff --git a/js/src/tests/test262/ch14/14.0/S14_A5_T2.js b/js/src/tests/test262/ch14/14.0/S14_A5_T2.js
new file mode 100644
index 000000000..ee3c9d2a3
--- /dev/null
+++ b/js/src/tests/test262/ch14/14.0/S14_A5_T2.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * The Identifer within a FunctionDeclaration can be written in both letters and unicode
+ *
+ * @path ch14/14.0/S14_A5_T2.js
+ * @description Declaring a function with "function \u005f\u005f\u0066\u0075\u006e\u0063(){return "unicode"}"
+ */
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__func() !== "unicode") {
+ $ERROR('#1: __func() === "unicode". Actual: __func() ==='+ __func() );
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+function __func(){return "ascii"};
+function \u005f\u005f\u0066\u0075\u006e\u0063(){return "unicode"};//__func in unicode
+
diff --git a/js/src/tests/test262/ch14/14.0/browser.js b/js/src/tests/test262/ch14/14.0/browser.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/js/src/tests/test262/ch14/14.0/browser.js
diff --git a/js/src/tests/test262/ch14/14.0/shell.js b/js/src/tests/test262/ch14/14.0/shell.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/js/src/tests/test262/ch14/14.0/shell.js
diff --git a/js/src/tests/test262/ch14/14.1/14.1-1-s.js b/js/src/tests/test262/ch14/14.1/14.1-1-s.js
new file mode 100644
index 000000000..6b2b377b8
--- /dev/null
+++ b/js/src/tests/test262/ch14/14.1/14.1-1-s.js
@@ -0,0 +1,23 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch14/14.1/14.1-1-s.js
+ * @description 'use strict' directive - correct usage
+ * @noStrict
+ */
+
+
+function testcase() {
+
+ function foo()
+ {
+ 'use strict';
+ return(this === undefined);
+ }
+
+ return foo.call(undefined);
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch14/14.1/14.1-10-s.js b/js/src/tests/test262/ch14/14.1/14.1-10-s.js
new file mode 100644
index 000000000..5badea52b
--- /dev/null
+++ b/js/src/tests/test262/ch14/14.1/14.1-10-s.js
@@ -0,0 +1,24 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch14/14.1/14.1-10-s.js
+ * @description other directives - may follow 'use strict' directive
+ * @noStrict
+ */
+
+
+function testcase() {
+
+ function foo()
+ {
+ "use strict";
+ "bogus directive";
+ return (this === undefined);
+ }
+
+ return foo.call(undefined);
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch14/14.1/14.1-11-s.js b/js/src/tests/test262/ch14/14.1/14.1-11-s.js
new file mode 100644
index 000000000..bb5cbf79c
--- /dev/null
+++ b/js/src/tests/test262/ch14/14.1/14.1-11-s.js
@@ -0,0 +1,26 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch14/14.1/14.1-11-s.js
+ * @description comments may preceed 'use strict' directive
+ * @noStrict
+ */
+
+
+function testcase() {
+
+ function foo()
+ {
+ // comment
+ /* comment */ "use strict";
+
+ return(this === undefined);
+
+ }
+
+ return foo.call(undefined);
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch14/14.1/14.1-12-s.js b/js/src/tests/test262/ch14/14.1/14.1-12-s.js
new file mode 100644
index 000000000..4aa3fb115
--- /dev/null
+++ b/js/src/tests/test262/ch14/14.1/14.1-12-s.js
@@ -0,0 +1,24 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch14/14.1/14.1-12-s.js
+ * @description comments may follow 'use strict' directive
+ * @noStrict
+ */
+
+
+function testcase() {
+
+ function foo()
+ {
+ "use strict"; /* comment */ // comment
+
+ return (this === undefined);
+ }
+
+ return foo.call(undefined);
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch14/14.1/14.1-13-s.js b/js/src/tests/test262/ch14/14.1/14.1-13-s.js
new file mode 100644
index 000000000..ba3889681
--- /dev/null
+++ b/js/src/tests/test262/ch14/14.1/14.1-13-s.js
@@ -0,0 +1,23 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch14/14.1/14.1-13-s.js
+ * @description semicolon insertion works for'use strict' directive
+ * @noStrict
+ */
+
+
+function testcase() {
+
+ function foo()
+ {
+ "use strict"
+ return (this === undefined);
+ }
+
+ return foo.call(undefined);
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch14/14.1/14.1-14-s.js b/js/src/tests/test262/ch14/14.1/14.1-14-s.js
new file mode 100644
index 000000000..fd37bd4f8
--- /dev/null
+++ b/js/src/tests/test262/ch14/14.1/14.1-14-s.js
@@ -0,0 +1,24 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch14/14.1/14.1-14-s.js
+ * @description semicolon insertion may come before 'use strict' directive
+ * @noStrict
+ */
+
+
+function testcase() {
+
+ function foo()
+ {
+ "another directive"
+ "use strict" ;
+ return (this === undefined);
+ }
+
+ return foo.call(undefined);
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch14/14.1/14.1-15-s.js b/js/src/tests/test262/ch14/14.1/14.1-15-s.js
new file mode 100644
index 000000000..38325c4d4
--- /dev/null
+++ b/js/src/tests/test262/ch14/14.1/14.1-15-s.js
@@ -0,0 +1,29 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch14/14.1/14.1-15-s.js
+ * @description blank lines may come before 'use strict' directive
+ * @noStrict
+ */
+
+
+function testcase() {
+
+ function foo()
+ {
+
+
+
+
+
+
+ "use strict" ;
+ return (this === undefined);
+ }
+
+ return foo.call(undefined);
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch14/14.1/14.1-16-s.js b/js/src/tests/test262/ch14/14.1/14.1-16-s.js
new file mode 100644
index 000000000..e63ef40d0
--- /dev/null
+++ b/js/src/tests/test262/ch14/14.1/14.1-16-s.js
@@ -0,0 +1,23 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch14/14.1/14.1-16-s.js
+ * @description 'use strict' directive - not recognized if it follow an empty statement
+ * @noStrict
+ */
+
+
+function testcase() {
+
+ function foo()
+ {
+ ; 'use strict';
+ return (this !== undefined);
+ }
+
+ return foo.call(undefined);
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch14/14.1/14.1-17-s.js b/js/src/tests/test262/ch14/14.1/14.1-17-s.js
new file mode 100644
index 000000000..cfc21ff21
--- /dev/null
+++ b/js/src/tests/test262/ch14/14.1/14.1-17-s.js
@@ -0,0 +1,23 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch14/14.1/14.1-17-s.js
+ * @description 'use strict' directive - not recognized if it follow some other statment empty statement
+ * @noStrict
+ */
+
+function testcase() {
+
+ function foo()
+ {
+ var x;
+ 'use strict';
+ return (this !== undefined);
+ }
+
+ return foo.call(undefined);
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch14/14.1/14.1-2-s.js b/js/src/tests/test262/ch14/14.1/14.1-2-s.js
new file mode 100644
index 000000000..9701c4020
--- /dev/null
+++ b/js/src/tests/test262/ch14/14.1/14.1-2-s.js
@@ -0,0 +1,23 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch14/14.1/14.1-2-s.js
+ * @description "use strict" directive - correct usage double quotes
+ * @noStrict
+ */
+
+
+function testcase() {
+
+ function foo()
+ {
+ "use strict";
+ return (this === undefined);
+ }
+
+ return foo.call(undefined);
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch14/14.1/14.1-3-s.js b/js/src/tests/test262/ch14/14.1/14.1-3-s.js
new file mode 100644
index 000000000..90eb7767a
--- /dev/null
+++ b/js/src/tests/test262/ch14/14.1/14.1-3-s.js
@@ -0,0 +1,23 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch14/14.1/14.1-3-s.js
+ * @description 'use strict' directive - not recognized if it contains extra whitespace
+ * @noStrict
+ */
+
+
+function testcase() {
+
+ function foo()
+ {
+ ' use strict ';
+ return (this !== undefined);
+ }
+
+ return foo.call(undefined);
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch14/14.1/14.1-4-s.js b/js/src/tests/test262/ch14/14.1/14.1-4-s.js
new file mode 100644
index 000000000..f53cd37fa
--- /dev/null
+++ b/js/src/tests/test262/ch14/14.1/14.1-4-s.js
@@ -0,0 +1,24 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch14/14.1/14.1-4-s.js
+ * @description 'use strict' directive - not recognized if contains Line Continuation
+ * @noStrict
+ */
+
+
+function testcase() {
+
+ function foo()
+ {
+ 'use str\
+ict';
+ return (this !== undefined);
+ }
+
+ return foo.call(undefined);
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch14/14.1/14.1-4gs.js b/js/src/tests/test262/ch14/14.1/14.1-4gs.js
new file mode 100644
index 000000000..67456de53
--- /dev/null
+++ b/js/src/tests/test262/ch14/14.1/14.1-4gs.js
@@ -0,0 +1,14 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch14/14.1/14.1-4gs.js
+ * @description StrictMode - a Use Strict Directive followed by a strict mode violation
+ * @onlyStrict
+ * @negative ^((?!NotEarlyError).)*$
+ */
+"use strict";
+throw NotEarlyError;
+eval = 42; \ No newline at end of file
diff --git a/js/src/tests/test262/ch14/14.1/14.1-5-s.js b/js/src/tests/test262/ch14/14.1/14.1-5-s.js
new file mode 100644
index 000000000..f0b40a12c
--- /dev/null
+++ b/js/src/tests/test262/ch14/14.1/14.1-5-s.js
@@ -0,0 +1,23 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch14/14.1/14.1-5-s.js
+ * @description 'use strict' directive - not recognized if contains a EscapeSequence
+ * @noStrict
+ */
+
+
+function testcase() {
+
+ function foo()
+ {
+ 'use\u0020strict';
+ return(this !== undefined);
+ }
+
+ return foo.call(undefined);
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch14/14.1/14.1-5gs.js b/js/src/tests/test262/ch14/14.1/14.1-5gs.js
new file mode 100644
index 000000000..9ce043a67
--- /dev/null
+++ b/js/src/tests/test262/ch14/14.1/14.1-5gs.js
@@ -0,0 +1,16 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch14/14.1/14.1-5gs.js
+ * @description StrictMode - a Use Strict Directive embedded in a directive prologue followed by a strict mode violation
+ * @onlyStrict
+ * @negative ^((?!NotEarlyError).)*$
+ */
+"a";
+"use strict";
+"c";
+throw NotEarlyError;
+eval = 42; \ No newline at end of file
diff --git a/js/src/tests/test262/ch14/14.1/14.1-6-s.js b/js/src/tests/test262/ch14/14.1/14.1-6-s.js
new file mode 100644
index 000000000..c779da837
--- /dev/null
+++ b/js/src/tests/test262/ch14/14.1/14.1-6-s.js
@@ -0,0 +1,23 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch14/14.1/14.1-6-s.js
+ * @description 'use strict' directive - not recognized if contains a <TAB> instead of a space
+ * @noStrict
+ */
+
+
+function testcase() {
+
+ function foo()
+ {
+ 'use strict';
+ return (this !== undefined);
+ }
+
+ return foo.call(undefined);
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch14/14.1/14.1-7-s.js b/js/src/tests/test262/ch14/14.1/14.1-7-s.js
new file mode 100644
index 000000000..a54b90774
--- /dev/null
+++ b/js/src/tests/test262/ch14/14.1/14.1-7-s.js
@@ -0,0 +1,23 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch14/14.1/14.1-7-s.js
+ * @description 'use strict' directive - not recognized if upper case
+ * @noStrict
+ */
+
+
+function testcase() {
+
+ function foo()
+ {
+ 'Use Strict';
+ return (this !== undefined);
+ }
+
+ return foo.call(undefined);
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch14/14.1/14.1-8-s.js b/js/src/tests/test262/ch14/14.1/14.1-8-s.js
new file mode 100644
index 000000000..446ab3a74
--- /dev/null
+++ b/js/src/tests/test262/ch14/14.1/14.1-8-s.js
@@ -0,0 +1,24 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch14/14.1/14.1-8-s.js
+ * @description 'use strict' directive - may follow other directives
+ * @noStrict
+ */
+
+
+function testcase() {
+
+ function foo()
+ {
+ "bogus directive";
+ "use strict";
+ return (this === undefined);
+ }
+
+ return foo.call(undefined);
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch14/14.1/14.1-9-s.js b/js/src/tests/test262/ch14/14.1/14.1-9-s.js
new file mode 100644
index 000000000..2efb4736a
--- /dev/null
+++ b/js/src/tests/test262/ch14/14.1/14.1-9-s.js
@@ -0,0 +1,24 @@
+/// Copyright (c) 2012 Ecma International. All rights reserved.
+/// Ecma International makes this code available under the terms and conditions set
+/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
+/// "Use Terms"). Any redistribution of this code must retain the above
+/// copyright and this notice and otherwise comply with the Use Terms.
+/**
+ * @path ch14/14.1/14.1-9-s.js
+ * @description 'use strict' directive - may occur multiple times
+ * @noStrict
+ */
+
+
+function testcase() {
+
+ function foo()
+ {
+ 'use strict';
+ "use strict";
+ return (this === undefined);
+ }
+
+ return foo.call(undefined);
+ }
+runTestCase(testcase);
diff --git a/js/src/tests/test262/ch14/14.1/browser.js b/js/src/tests/test262/ch14/14.1/browser.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/js/src/tests/test262/ch14/14.1/browser.js
diff --git a/js/src/tests/test262/ch14/14.1/shell.js b/js/src/tests/test262/ch14/14.1/shell.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/js/src/tests/test262/ch14/14.1/shell.js
diff --git a/js/src/tests/test262/ch14/browser.js b/js/src/tests/test262/ch14/browser.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/js/src/tests/test262/ch14/browser.js
diff --git a/js/src/tests/test262/ch14/shell.js b/js/src/tests/test262/ch14/shell.js
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/js/src/tests/test262/ch14/shell.js