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

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

[nongnu] elpa/forth-mode 64209f501c 108/153: Merge pull request #35 from


From: ELPA Syncer
Subject: [nongnu] elpa/forth-mode 64209f501c 108/153: Merge pull request #35 from ellerh/forward-sexp-tests
Date: Sat, 29 Jan 2022 08:02:23 -0500 (EST)

branch: elpa/forth-mode
commit 64209f501caf5b5a33373b83115ffe8146a1f502
Merge: 350638bb0c d1498037a2
Author: Helmut Eller <eller.helmut@gmail.com>
Commit: GitHub <noreply@github.com>

    Merge pull request #35 from ellerh/forward-sexp-tests
    
    Trying out my new merge powers
---
 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))



reply via email to

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