summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/global-code/export.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/language/global-code/export.js')
-rw-r--r--js/src/tests/test262/language/global-code/export.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/global-code/export.js b/js/src/tests/test262/language/global-code/export.js
new file mode 100644
index 0000000000..311de8f951
--- /dev/null
+++ b/js/src/tests/test262/language/global-code/export.js
@@ -0,0 +1,22 @@
+// |reftest| error:SyntaxError
+// 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 `export` declaration may not appear within a ScriptBody
+esid: sec-scripts
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ A.5 Scripts and Modules
+
+ Script:
+ ScriptBodyopt
+
+ ScriptBody:
+ StatementList
+---*/
+
+$DONOTEVALUATE();
+
+export default null;