branch: elpa/lua-mode
commit 32655523727fa32cbe690db6e2b74c363f8f7648
Author: immerrr <[email protected]>
Commit: immerrr <[email protected]>
indentation-test: add continuation tests for unary ops and ...
---
test/indentation-test.el | 45 ++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 40 insertions(+), 5 deletions(-)
diff --git a/test/indentation-test.el b/test/indentation-test.el
index 2ccfe34..7ebc6c0 100644
--- a/test/indentation-test.el
+++ b/test/indentation-test.el
@@ -115,19 +115,19 @@ this_should_be_unindented_three = etc"))
(ert-deftest lua-indentation-dot-and-colon-continuation ()
(should-lua-indent "\
-foo
+foo123
.bar:baz(xyz)")
(should-lua-indent "\
-foo.
+foo123.
bar:baz(xyz)")
(should-lua-indent "\
-foo.bar
+foo123.bar
:baz(xyz)")
(should-lua-indent "\
-foo.bar:
+foo123.bar:
baz(xyz)")
(should-lua-indent "\
-foo.bar
+foo123.bar
.baz
.qux
:quux(xyz)"))
@@ -146,6 +146,41 @@ a = foo
BINOP bar" 'fixedcase)))))
+(ert-deftest lua-indentation-ellipsis ()
+ (should-lua-indent "\
+function x(...)
+ a, b = 1, ...
+ return b
+end"))
+
+
+(ert-deftest lua-indentation-unop-continuation ()
+ :expected-result :failed
+ (should-lua-indent "\
+foo = bar
+ -#some_str")
+
+ (should-lua-indent "\
+foobar(qux,
+ -quux)")
+
+ (should-lua-indent "\
+foobar(qux, xyzzy
+ -quux)")
+
+ (should-lua-indent "\
+foobar(qux,
+ #quux)")
+
+ (should-lua-indent "\
+foobar(qux,
+ not quux)")
+
+ (should-lua-indent "\
+foobar(qux, xyzzy and
+ not quux)"))
+
+
(ert-deftest lua-indentation-return-continuation ()
(should-lua-indent "\
return