summaryrefslogtreecommitdiff
path: root/test/lisp/progmodes/js-resources/js-indent-init-dynamic.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/lisp/progmodes/js-resources/js-indent-init-dynamic.js')
-rw-r--r--test/lisp/progmodes/js-resources/js-indent-init-dynamic.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/lisp/progmodes/js-resources/js-indent-init-dynamic.js b/test/lisp/progmodes/js-resources/js-indent-init-dynamic.js
new file mode 100644
index 00000000000..536a976e86e
--- /dev/null
+++ b/test/lisp/progmodes/js-resources/js-indent-init-dynamic.js
@@ -0,0 +1,30 @@
+var foo = function() {
+ return 7;
+};
+
+var foo = function() {
+ return 7;
+ },
+ bar = 8;
+
+var foo = function() {
+ return 7;
+ },
+ bar = function() {
+ return 8;
+ };
+
+// Local Variables:
+// indent-tabs-mode: nil
+// js-indent-level: 2
+// js-indent-first-init: dynamic
+// End:
+
+// The following test intentionally produces a scan error and should
+// be placed below all other tests to prevent awkward indentation.
+// (It still thinks it's within the body of a function.)
+
+var foo = function() {
+ return 7;
+ ,
+ bar = 8;