branch: externals/matlab-mode
commit 9528b08e94b7bf242fd053b539da001e43f4887a
Author: John Ciolfi <[email protected]>
Commit: John Ciolfi <[email protected]>
matlab-ts-mode: add indent test of expressions to lockdown behavior
---
.../indent_expr_continued.m | 14 ++++++++++++++
.../indent_expr_continued_expected.m | 14 ++++++++++++++
2 files changed, 28 insertions(+)
diff --git a/tests/test-matlab-ts-mode-indent-files/indent_expr_continued.m
b/tests/test-matlab-ts-mode-indent-files/indent_expr_continued.m
new file mode 100644
index 0000000000..6bad2d1e6b
--- /dev/null
+++ b/tests/test-matlab-ts-mode-indent-files/indent_expr_continued.m
@@ -0,0 +1,14 @@
+% -*- matlab-ts -*-
+
+% For boolean expressions when in an if statement or assignement to a variable,
+% we align them.
+
+if obj.IsSomeLongFunction && ...
+ ~strcmp(obj.property1, obj.property2) && ...
+ someOtherCond
+ disp('is true');
+end
+
+s.theThingEnabled = obj.IsSomeLongFunction && ...
+ ~strcmp(obj.property1, obj.property2) && ...
+ someOtherCond;
diff --git
a/tests/test-matlab-ts-mode-indent-files/indent_expr_continued_expected.m
b/tests/test-matlab-ts-mode-indent-files/indent_expr_continued_expected.m
new file mode 100644
index 0000000000..6bad2d1e6b
--- /dev/null
+++ b/tests/test-matlab-ts-mode-indent-files/indent_expr_continued_expected.m
@@ -0,0 +1,14 @@
+% -*- matlab-ts -*-
+
+% For boolean expressions when in an if statement or assignement to a variable,
+% we align them.
+
+if obj.IsSomeLongFunction && ...
+ ~strcmp(obj.property1, obj.property2) && ...
+ someOtherCond
+ disp('is true');
+end
+
+s.theThingEnabled = obj.IsSomeLongFunction && ...
+ ~strcmp(obj.property1, obj.property2) && ...
+ someOtherCond;