branch: elpa/lua-mode
commit 63155912d3744a43f70b6472703a9115bad32198
Author: immerrr <[email protected]>
Commit: immerrr <[email protected]>
indentation-test: extend unary op test cases
---
test/indentation-test.el | 37 +++++++++++++++++++++----------------
1 file changed, 21 insertions(+), 16 deletions(-)
diff --git a/test/indentation-test.el b/test/indentation-test.el
index 7ebc6c0..bfd5b31 100644
--- a/test/indentation-test.el
+++ b/test/indentation-test.el
@@ -160,25 +160,30 @@ end"))
foo = bar
-#some_str")
- (should-lua-indent "\
+ (cl-dolist (unop '("-" "#" "not "))
+ (should-lua-indent (replace-regexp-in-string "UNOP" unop "\
foobar(qux,
- -quux)")
-
- (should-lua-indent "\
+ UNOPquux)" 'fixedcase))
+ (should-lua-indent (replace-regexp-in-string "UNOP" unop "\
foobar(qux, xyzzy
- -quux)")
-
- (should-lua-indent "\
-foobar(qux,
- #quux)")
-
- (should-lua-indent "\
-foobar(qux,
- not quux)")
+ UNOPquux)" 'fixedcase))
+ (should-lua-indent (replace-regexp-in-string "UNOP" unop "\
+foobar(
+ UNOPquux)" 'fixedcase))
+ (should-lua-indent (replace-regexp-in-string "UNOP" unop "\
+x = {qux,
+ UNOPquux}" 'fixedcase))
+ (should-lua-indent (replace-regexp-in-string "UNOP" unop "\
+x = {qux;
+ UNOPquux}" 'fixedcase))
+ (should-lua-indent (replace-regexp-in-string "UNOP" unop "\
+x = {qux, xyzzy
+ UNOPquux}" 'fixedcase))
+ (should-lua-indent (replace-regexp-in-string "UNOP" unop "\
+x = {
+ UNOPquux
+}" 'fixedcase))))
- (should-lua-indent "\
-foobar(qux, xyzzy and
- not quux)"))
(ert-deftest lua-indentation-return-continuation ()