diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
commit | 2aa4a82499d4becd2284cdb482213d541b8804dd (patch) | |
tree | b80bf8bf13c3766139fbacc530efd0dd9d54394c /js/src/tests/test262/language/module-code/instn-named-id-name.js | |
parent | Initial commit. (diff) | |
download | firefox-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/module-code/instn-named-id-name.js')
-rw-r--r-- | js/src/tests/test262/language/module-code/instn-named-id-name.js | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/module-code/instn-named-id-name.js b/js/src/tests/test262/language/module-code/instn-named-id-name.js new file mode 100644 index 0000000000..2272b68f39 --- /dev/null +++ b/js/src/tests/test262/language/module-code/instn-named-id-name.js @@ -0,0 +1,56 @@ +// |reftest| module +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: > + The first identifier in an ImportSpecifier containing `as` may be any valid + IdentifierName +esid: sec-imports +info: | + ImportSpecifier: + ImportedBinding + IdentifierName as ImportedBinding +flags: [module] +---*/ + +var _if = 1; +var _import = 2; +var _export = 3; +var _await = 4; +var _arguments = 5; +var _eval = 6; +var _default = 7; +var _as = 8; + +export { + _if as if, + _import as import, + _export as export, + _await as await, + _arguments as arguments, + _eval as eval, + _default as default, + _as as as + }; + +import { + if as if_, + import as import_, + export as export_, + await as await_, + arguments as arguments_, + eval as eval_, + default as default_, + as as as + } from './instn-named-id-name.js'; + +assert.sameValue(if_, 1); +assert.sameValue(import_, 2); +assert.sameValue(export_, 3); +assert.sameValue(await_, 4); +assert.sameValue(arguments_, 5); +assert.sameValue(eval_, 6); +assert.sameValue(default_, 7); +assert.sameValue(as, 8); + +reportCompare(0, 0); |