[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/forth-mode d1498037a2 107/153: Add simple tests for forwar
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/forth-mode d1498037a2 107/153: Add simple tests for forward-sexp |
Date: |
Sat, 29 Jan 2022 08:02:22 -0500 (EST) |
branch: elpa/forth-mode
commit d1498037a28ceef1cc6479b52d34b29e4eaad5d4
Author: Helmut Eller <eller.helmut@gmail.com>
Commit: Helmut Eller <eller.helmut@gmail.com>
Add simple tests for forward-sexp
* test/tests.el (forth-sexp-movements): New test
(forth-assert-forward-sexp): New helper.
* fort-smie.el (forth-smie--grammar): Add rule for :noname ... ; so
that forward-sexp works and it "blinks" in the right when point is on it.
---
forth-smie.el | 3 ++-
test/tests.el | 11 +++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/forth-smie.el b/forth-smie.el
index ae44364ca7..aa6b64a382 100644
--- a/forth-smie.el
+++ b/forth-smie.el
@@ -18,7 +18,8 @@
("do" words "loop")
("do" words "+loop")
("begin-structure" words "end-structure")
- (":" words ";"))
+ (":" words ";")
+ (":noname" words ";"))
(words)))))
(defvar forth-smie--basic-indent 2)
diff --git a/test/tests.el b/test/tests.el
index e9460de9cc..1681a10389 100644
--- a/test/tests.el
+++ b/test/tests.el
@@ -50,6 +50,12 @@ The whitespace before and including \"|\" on each line is
removed."
(should (string= (forth-strip-| expected)
(substring-no-properties (buffer-string))))))))
+(defun forth-assert-forward-sexp (content start end)
+ (forth-with-temp-buffer content
+ (goto-char start)
+ (forward-sexp)
+ (should (= (point) end))))
+
(ert-deftest forth-paren-comment-font-lock ()
(forth-assert-face "( )" 1 font-lock-comment-delimiter-face)
(forth-assert-face ".( )" 1 font-lock-comment-face)
@@ -170,3 +176,8 @@ The whitespace before and including \"|\" on each line is
removed."
| [char] b of bar endof
| drop exit
|endcase"))
+
+(ert-deftest forth-sexp-movements ()
+ (forth-assert-forward-sexp " : foo bar ; \ x" 2 13)
+ (forth-assert-forward-sexp " :noname foo bar ; \ x" 2 19)
+ (forth-assert-forward-sexp " if drop exit else 1+ then bar " 2 27))
- [nongnu] elpa/forth-mode 992bfb64b4 103/153: Fix warning about font-lock-fontify-buffer non-interactive use., (continued)
- [nongnu] elpa/forth-mode 992bfb64b4 103/153: Fix warning about font-lock-fontify-buffer non-interactive use., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode efa1f0a336 046/153: Build Emacs Lisp files., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 1bc27cd6b6 115/153: Support paragraph filling in comments, ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 4868a0ff03 051/153: Fix for imenu integration., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 5b42dfac0c 105/153: Merge branch 'master' into case-insensitive-indentation, ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode c8103312c3 041/153: Fix typo., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode b83ff1274b 054/153: Type C-c C-s to SEE a word., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 2f5d87f3c5 126/153: No 64-bit build for pForth in Ubuntu. Try Gforth., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 2813a7bf3d 090/153: Introduce a hook to initialize backends, ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode c64035c209 073/153: Add backends for Forth implementations., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode d1498037a2 107/153: Add simple tests for forward-sexp,
ELPA Syncer <=
- [nongnu] elpa/forth-mode 83a62c82c4 030/153: Move all package metadata to forth-mode.el., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 186bae4853 083/153: Fix set-process-window-size parameter order., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 48bcf41d63 058/153: Cache words from interactive Forth., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode f418b9aac2 087/153: Set process coding system for SwiftForth., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode f3d76c12c1 125/153: Test completion-at-point, ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 4dc1ff0f3b 086/153: Include backend files in make dependencies., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 2779ca61ab 075/153: Improve building of backend files., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 71016700dc 095/153: Emacs 23: use cl library instead of cl-lib., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode 715d813c83 062/153: Clean up tests., ELPA Syncer, 2022/01/29
- [nongnu] elpa/forth-mode e35317f2f7 093/153: Improve syntax-propertize function, ELPA Syncer, 2022/01/29