emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/lua-mode 3265552 263/468: indentation-test: add continuati


From: Philip Kaludercic
Subject: [nongnu] elpa/lua-mode 3265552 263/468: indentation-test: add continuation tests for unary ops and ...
Date: Thu, 5 Aug 2021 04:58:50 -0400 (EDT)

branch: elpa/lua-mode
commit 32655523727fa32cbe690db6e2b74c363f8f7648
Author: immerrr <immerrr+lua@gmail.com>
Commit: immerrr <immerrr+lua@gmail.com>

    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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]