[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/lua-mode 3a0fb4b 431/468: `lua-funcname-at-point': add tes
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/lua-mode 3a0fb4b 431/468: `lua-funcname-at-point': add tests |
Date: |
Thu, 5 Aug 2021 04:59:23 -0400 (EDT) |
branch: elpa/lua-mode
commit 3a0fb4bfe83f6702eba9f84991c7eb3b3b3fc5f7
Author: Nikita Bloshchanevich <nikblos@outlook.com>
Commit: Nikita Bloshchanevich <nikblos@outlook.com>
`lua-funcname-at-point': add tests
---
test/test-funcname-at-point.el | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/test/test-funcname-at-point.el b/test/test-funcname-at-point.el
new file mode 100644
index 0000000..a73b368
--- /dev/null
+++ b/test/test-funcname-at-point.el
@@ -0,0 +1,31 @@
+;;; test-funcname-at-point.el --- Test `lua-funcname-at-point'
+
+;;; Commentary:
+
+;; Ensure that `lua-funcname-at-point' works correctly in all intended
+;; circumstances.
+
+;;; Code:
+
+(describe "Test `lua-funcname-at-point'."
+ (it "handles trailing periods"
+ (with-temp-buffer
+ (insert "table.insert.")
+ (backward-char)
+ (expect (lua-funcname-at-point) :to-equal "table.insert")))
+ (it "handles point being in the middle"
+ (with-temp-buffer
+ (insert "table.")
+ (save-excursion
+ (insert "insert."))
+ (expect (lua-funcname-at-point) :to-equal "table.insert")))
+ (it "handles point being at the start of the buffer"
+ (with-temp-buffer
+ (save-excursion (insert "table.insert."))
+ (expect (lua-funcname-at-point) :to-equal "table.insert")))
+ (it "ignores identifiers before point"
+ (with-temp-buffer
+ (insert "table.insert.")
+ (expect (lua-funcname-at-point) :to-be nil))))
+
+;;; test-funcname-at-point.el ends here
- [nongnu] elpa/lua-mode c0d8c50 295/468: Merge pull request #86 from immerrr/if-loadstring-is-nil-use-load, (continued)
- [nongnu] elpa/lua-mode c0d8c50 295/468: Merge pull request #86 from immerrr/if-loadstring-is-nil-use-load, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 3f7a032 300/468: Move .nosearch in test/, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode ca24f4c 302/468: Add `run-lua` alias, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 530aa9f 303/468: Merge pull request #97 from marsam/master, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 92d9729 307/468: Add init-tryout.el to persistent initialization code, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 04a2772 310/468: Fix goto label fontification, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode fbad628 316/468: Add travis.yml, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 6b32777 413/468: assignment statements: unindent closing parenthesis on right hand side, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 6638de0 437/468: Merge pull request #182 from immerrr/enable-ci-via-github-actions, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode a4f49d3 438/468: Consider point as inside comment if it is inside "--" opener, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 3a0fb4b 431/468: `lua-funcname-at-point': add tests,
Philip Kaludercic <=
- [nongnu] elpa/lua-mode 430679c 433/468: `lua-funcname-at-point': handle identifiers before, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 432d9a0 333/468: lua-try-match-multiline-begin: reword the comment, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode ecfe465 352/468: Remove testing for Emacs < 24.3, and add 25.2 and 25.3, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 99312b8 365/468: Merge pull request #134 from velkyel/master, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 4342dd1 372/468: Fix compatibility with new rx package from Emacs 27, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 50d94a4 373/468: tests: silence "Indenting region..." messages, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode d746b7e 381/468: Fix typos, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode dc30240 384/468: Merge pull request #160 from tarsiiformes/typo, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 4db05e8 389/468: Use cl-lib instead of cl, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 3f67365 394/468: Renamed word “Result” to “Actual” in matcher's message, Philip Kaludercic, 2021/08/05