[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/lua-mode d166d5e 267/468: Merge remote-tracking branch 'up
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/lua-mode d166d5e 267/468: Merge remote-tracking branch 'upstream/master' |
Date: |
Thu, 5 Aug 2021 04:58:50 -0400 (EDT) |
branch: elpa/lua-mode
commit d166d5e5a8ef8e795cd09188cc04a8d3682e7d1e
Merge: 0a1e915 0a986f7
Author: xristos <xristos@sdf.lonestar.org>
Commit: xristos <xristos@sdf.lonestar.org>
Merge remote-tracking branch 'upstream/master'
---
Makefile | 1 +
lua-mode.el | 3 ++-
test/indentation-test.el | 50 +++++++++++++++++++++++++++++++++++++++++++-----
test/inferior-test.el | 27 ++++++++++++++++++++++++++
test/test-helper.el | 2 ++
5 files changed, 77 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
index 2c946fb..48c9385 100644
--- a/Makefile
+++ b/Makefile
@@ -15,6 +15,7 @@ TESTS += test/electric-mode-test.el
TESTS += test/indentation-test.el
TESTS += test/strings-and-comments-test.el
TESTS += test/generic-test.el
+TESTS += test/inferior-test.el
default:
@echo version is $(VERSION)
diff --git a/lua-mode.el b/lua-mode.el
index cac66e0..31dca83 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -651,7 +651,8 @@ Groups 6-9 can be used in any of argument regexps."
(defvar lua-sexp-alist '(("then" . "end")
("function" . "end")
- ("do" . "end")))
+ ("do" . "end")
+ ("repeat" . "until")))
(defvar lua-mode-abbrev-table nil
"Abbreviation table used in lua-mode buffers.")
diff --git a/test/indentation-test.el b/test/indentation-test.el
index 2ccfe34..bfd5b31 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,46 @@ 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")
+
+ (cl-dolist (unop '("-" "#" "not "))
+ (should-lua-indent (replace-regexp-in-string "UNOP" unop "\
+foobar(qux,
+ UNOPquux)" 'fixedcase))
+ (should-lua-indent (replace-regexp-in-string "UNOP" unop "\
+foobar(qux, xyzzy
+ 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))))
+
+
+
(ert-deftest lua-indentation-return-continuation ()
(should-lua-indent "\
return
diff --git a/test/inferior-test.el b/test/inferior-test.el
new file mode 100644
index 0000000..34fbdbf
--- /dev/null
+++ b/test/inferior-test.el
@@ -0,0 +1,27 @@
+;; lua-mode tests for inferior process handling
+
+(load (concat (file-name-directory (or load-file-name (buffer-file-name)
+ default-directory))
+ "test-helper.el") nil 'nomessage 'nosuffix)
+
+
+(ert-deftest lua-hide-process-buffer-doesnt-switch-current-window ()
+ :expected-result :failed
+
+ (with-lua-buffer
+ (let ((cur-buf (current-buffer)))
+ (should (get-buffer-window cur-buf))
+
+ (lua-hide-process-buffer)
+ (should (get-buffer-window cur-buf)))))
+
+(ert-deftest lua-hide-process-buffer-doesnt-signal-on-killed-process ()
+ :expected-result :failed
+ (with-lua-buffer
+ (let ((cur-buf (current-buffer)))
+ (lua-start-process)
+ (lua-kill-process)
+
+ (lua-hide-process-buffer)
+ (should (get-buffer-window cur-buf)))))
+
diff --git a/test/test-helper.el b/test/test-helper.el
index 6c1a87e..3c407ba 100644
--- a/test/test-helper.el
+++ b/test/test-helper.el
@@ -59,6 +59,8 @@ This is a mere typing/reading aid for lua-mode's font-lock
tests."
(defmacro with-lua-buffer (&rest body)
`(with-temp-buffer
+ (set (make-local-variable 'lua-process) nil)
+ (set (make-local-variable 'lua-process-buffer) nil)
(switch-to-buffer (current-buffer))
(lua-mode)
(font-lock-fontify-buffer)
- [nongnu] elpa/lua-mode 28155ba 241/468: Update README.md, (continued)
- [nongnu] elpa/lua-mode 28155ba 241/468: Update README.md, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 45a881d 243/468: lua-search-documentation: fix 'foo.bar' lookups broken when making '.' punctuation, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode f8a41b8 246/468: Fix cl-lib dependency for Emacs23 tests, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 9e200e8 247/468: Fix font-locking of functions with underscores (issue #63), Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode bbab5a6 253/468: Don't anchor arglist continuation to block openers, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 9d86a22 254/468: Fix indentation error raised if 'else' is on the same line as 'if', Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 2ad2ac8 256/468: lua-imenu-generic-expression add support for local function, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 8ff3427 257/468: Merge pull request #65 from guoxx/master, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 78f0e09 260/468: Make sure nested token searches begin from open-token positions, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 2cdfda7 264/468: Add inferior-test.el with some basic (failing) tests, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode d166d5e 267/468: Merge remote-tracking branch 'upstream/master',
Philip Kaludercic <=
- [nongnu] elpa/lua-mode d52e291 270/468: Don't fontify "stdin:N:" stacktrace entries in REPL buffer, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode ec1b634 271/468: Bump NEWS, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode d4ee03e 278/468: Use syntax-propertize-function if it is available, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode fd0f6ba 280/468: Merge pull request #69 from atomontage/master, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 694421c 274/468: Add lua-remove-syntax-table-property to syntactic keywords, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode b73794f 276/468: Merge pull request #79 from j-fu/master, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 13f6ffa 277/468: Provide lua--setq-local fallback macro for pre-24.3, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode ce0a813 282/468: Mention xristos in AUTHORS, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 6d66aee 284/468: Redo handling of "stdin:N" in tracebacks, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode d7855bc 285/468: remove function lua-comment-p, Philip Kaludercic, 2021/08/05