aboutsummaryrefslogtreecommitdiffstats
path: root/tests/indent
diff options
context:
space:
mode:
Diffstat (limited to 'tests/indent')
-rw-r--r--tests/indent/dart/multiple_arguments.dart13
-rw-r--r--tests/indent/dart_spec.lua2
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/indent/dart/multiple_arguments.dart b/tests/indent/dart/multiple_arguments.dart
new file mode 100644
index 000000000..63a4a0438
--- /dev/null
+++ b/tests/indent/dart/multiple_arguments.dart
@@ -0,0 +1,13 @@
+// Example method that causes an issue with indentation on usage
+void someMethod(
+ void onSuccess(),
+ void onError(Exception ex, StackTrace stackTrace),
+) {
+ try {} catch (_, __) {}
+}
+
+void main() {
+ someMethod(() {
+ }, (Exception ex, StackTrace stackTrace) {
+ });
+}
diff --git a/tests/indent/dart_spec.lua b/tests/indent/dart_spec.lua
index fde41b362..b2632cfa4 100644
--- a/tests/indent/dart_spec.lua
+++ b/tests/indent/dart_spec.lua
@@ -18,4 +18,6 @@ end)
describe("new line:", function()
run:new_line("class.dart", { on_line = 2, text = "var x;", indent = 0 })
run:new_line("try.dart", { on_line = 2, text = "var x;", indent = 4 })
+ run:new_line("multiple_arguments.dart", { on_line = 10, text = "var x;", indent = 4 })
+ run:new_line("multiple_arguments.dart", { on_line = 11, text = "var x;", indent = 4 })
end)