summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/import
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
commit2aa4a82499d4becd2284cdb482213d541b8804dd (patch)
treeb80bf8bf13c3766139fbacc530efd0dd9d54394c /js/src/tests/test262/language/import
parentInitial commit. (diff)
downloadfirefox-upstream.tar.xz
firefox-upstream.zip
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/tests/test262/language/import')
-rw-r--r--js/src/tests/test262/language/import/browser.js0
-rw-r--r--js/src/tests/test262/language/import/dup-bound-names.js17
-rw-r--r--js/src/tests/test262/language/import/escaped-as-import-specifier.js27
-rw-r--r--js/src/tests/test262/language/import/escaped-as-namespace-import.js25
-rw-r--r--js/src/tests/test262/language/import/escaped-from.js25
-rw-r--r--js/src/tests/test262/language/import/shell.js0
6 files changed, 94 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/import/browser.js b/js/src/tests/test262/language/import/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/import/browser.js
diff --git a/js/src/tests/test262/language/import/dup-bound-names.js b/js/src/tests/test262/language/import/dup-bound-names.js
new file mode 100644
index 0000000000..fd4193612e
--- /dev/null
+++ b/js/src/tests/test262/language/import/dup-bound-names.js
@@ -0,0 +1,17 @@
+// |reftest| error:SyntaxError module
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+es6id: 15.2.1.1
+description: >
+ It is a Syntax Error if the BoundNames of ImportDeclaration contains any
+ duplicate entries.
+flags: [module]
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+import { x, y as x } from 'z';
diff --git a/js/src/tests/test262/language/import/escaped-as-import-specifier.js b/js/src/tests/test262/language/import/escaped-as-import-specifier.js
new file mode 100644
index 0000000000..59d1a47d4e
--- /dev/null
+++ b/js/src/tests/test262/language/import/escaped-as-import-specifier.js
@@ -0,0 +1,27 @@
+// |reftest| error:SyntaxError module
+// Copyright (C) 2017 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-grammar-notation
+description: >
+ The `as` contextual keyword must not contain Unicode escape sequences.
+info: |
+ Terminal symbols of the lexical, RegExp, and numeric string grammars are shown
+ in fixed width font, both in the productions of the grammars and throughout this
+ specification whenever the text directly refers to such a terminal symbol. These
+ are to appear in a script exactly as written. All terminal symbol code points
+ specified in this way are to be understood as the appropriate Unicode code points
+ from the Basic Latin range, as opposed to any similar-looking code points from
+ other Unicode ranges.
+negative:
+ phase: parse
+ type: SyntaxError
+flags: [module]
+---*/
+
+$DONOTEVALUATE();
+
+export var a = 0;
+
+import {a \u0061s b} from "./escaped-as-import-specifier.js";
diff --git a/js/src/tests/test262/language/import/escaped-as-namespace-import.js b/js/src/tests/test262/language/import/escaped-as-namespace-import.js
new file mode 100644
index 0000000000..a5d5ac2b4c
--- /dev/null
+++ b/js/src/tests/test262/language/import/escaped-as-namespace-import.js
@@ -0,0 +1,25 @@
+// |reftest| error:SyntaxError module
+// Copyright (C) 2017 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-grammar-notation
+description: >
+ The `as` contextual keyword must not contain Unicode escape sequences.
+info: |
+ Terminal symbols of the lexical, RegExp, and numeric string grammars are shown
+ in fixed width font, both in the productions of the grammars and throughout this
+ specification whenever the text directly refers to such a terminal symbol. These
+ are to appear in a script exactly as written. All terminal symbol code points
+ specified in this way are to be understood as the appropriate Unicode code points
+ from the Basic Latin range, as opposed to any similar-looking code points from
+ other Unicode ranges.
+negative:
+ phase: parse
+ type: SyntaxError
+flags: [module]
+---*/
+
+$DONOTEVALUATE();
+
+import* \u0061s self from "./escaped-as-namespace-import.js";
diff --git a/js/src/tests/test262/language/import/escaped-from.js b/js/src/tests/test262/language/import/escaped-from.js
new file mode 100644
index 0000000000..571c45964f
--- /dev/null
+++ b/js/src/tests/test262/language/import/escaped-from.js
@@ -0,0 +1,25 @@
+// |reftest| error:SyntaxError module
+// Copyright (C) 2017 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-grammar-notation
+description: >
+ The `from` contextual keyword must not contain Unicode escape sequences.
+info: |
+ Terminal symbols of the lexical, RegExp, and numeric string grammars are shown
+ in fixed width font, both in the productions of the grammars and throughout this
+ specification whenever the text directly refers to such a terminal symbol. These
+ are to appear in a script exactly as written. All terminal symbol code points
+ specified in this way are to be understood as the appropriate Unicode code points
+ from the Basic Latin range, as opposed to any similar-looking code points from
+ other Unicode ranges.
+negative:
+ phase: parse
+ type: SyntaxError
+flags: [module]
+---*/
+
+$DONOTEVALUATE();
+
+import {} \u0066rom "./escaped-from.js";
diff --git a/js/src/tests/test262/language/import/shell.js b/js/src/tests/test262/language/import/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/import/shell.js