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

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

[nongnu] elpa/lua-mode 6315591 265/468: indentation-test: extend unary o


From: Philip Kaludercic
Subject: [nongnu] elpa/lua-mode 6315591 265/468: indentation-test: extend unary op test cases
Date: Thu, 5 Aug 2021 04:58:50 -0400 (EDT)

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

    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 ()



reply via email to

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