branch: externals/hyperbole
commit c024330f5a160321d74ca120a2141d9630db33d1
Author: bw <[email protected]>
Commit: bw <[email protected]>

    test/hywiki-*.el - Minor HyWiki test improvements
---
 test/hywiki-tests.el     | 10 +++++-----
 test/hywiki-yki-tests.el | 38 +++++++++++++++++++++-----------------
 2 files changed, 26 insertions(+), 22 deletions(-)

diff --git a/test/hywiki-tests.el b/test/hywiki-tests.el
index fafe77aec69..797dfc109c4 100644
--- a/test/hywiki-tests.el
+++ b/test/hywiki-tests.el
@@ -3,7 +3,7 @@
 ;; Author:       Mats Lidell
 ;;
 ;; Orig-Date:    18-May-24 at 23:59:48
-;; Last-Mod:     25-Jun-26 at 13:00:41 by Bob Weiner
+;; Last-Mod:      4-Jul-26 at 20:07:04 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -2265,7 +2265,7 @@ expected result."
 
 (ert-deftest hywiki-tests--verify-hook-functions ()
   "Verify that the hook functions are set and torn down."
-  (cl-flet* ((hooks-exists: (info)
+  (cl-flet* ((hooks-exist: (info)
                (ert-info ((format "Hywiki-mode %s - %s" hywiki-mode info))
                  (should (memq 'hywiki-word-store-around-point 
pre-command-hook))
                  (should (memq 'hywiki-word-highlight-post-self-insert 
post-self-insert-hook))
@@ -2276,15 +2276,15 @@ expected result."
                  (should-not (memq 'hywiki-word-highlight-post-self-insert 
post-self-insert-hook))
                  (should-not (memq 'hywiki-word-highlight-post-command 
post-command-hook)))))
     (hywiki-tests--preserve-hywiki-mode
-      (hooks-exists: "In temp buffer")
+      (hooks-exist: "In temp buffer")
       (save-excursion
         (with-current-buffer (find-file-noselect wiki-page)
-          (hooks-exists: "In wiki-page")))
+          (hooks-exist: "In wiki-page")))
       (hywiki-mode :pages)
       (hooks-removed: "In temp buffer")
       (save-excursion
         (with-current-buffer (find-file-noselect wiki-page)
-          (hooks-exists: "In wiki-page")))
+          (hooks-exist: "In wiki-page")))
       (hywiki-mode nil)
       (hooks-removed: "In temp buffer")
       (save-excursion
diff --git a/test/hywiki-yki-tests.el b/test/hywiki-yki-tests.el
index e45e14eb016..61430cc7a69 100644
--- a/test/hywiki-yki-tests.el
+++ b/test/hywiki-yki-tests.el
@@ -3,7 +3,7 @@
 ;; Author:       Mats Lidell
 ;;
 ;; Orig-Date:    13-Jul-25 at 19:50:37
-;; Last-Mod:     18-Jan-26 at 08:45:21 by Bob Weiner
+;; Last-Mod:      4-Jul-26 at 20:20:06 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -166,20 +166,27 @@ Each test is constructed as three phases:
                   (should (string= stop 
(hywiki-test--get-buffer-text-with-point-and-highlight)))))
        (unwind-protect
            (progn
-             (ert-info ("1" :prefix "Verify point, no highlighting:")
-               (pre: "non^wikiword")
-               (post: "non^wikiword"))
+             ;; PASS: "WikiWord#section"<delete-char-backwards> -> no
+             ;; highlight change "{WikiWord#section}
+             (ert-info ("1" :prefix "Verify highlighting: ")
+               (pre: "\"WikiWord#section\"^")
+               (exec: #'backward-delete-char-untabify 1)
+               (post: "\"<WikiWord#section>^"))
+
              (ert-info ("2" :prefix "Verify point, no highlighting: ")
                (pre: "non^wikiword")
                (forward-char 1)
                (pre: "nonw^ikiword"))
+
              (ert-info ("3" :prefix "Verify highlighting: ")
                (pre: "^Hi")
                (post: "^<Hi>"))
+
              (ert-info ("4" :prefix "Verify highlighting: ")
                (pre: "Hi^Ho")
                (hywiki-tests--insert-by-char "text ")
                (post: "Hitext ^<Ho>"))
+
              (ert-info ("5" :prefix "Verify highlighting: ")
                (pre: "Hi^Ho")
                (hywiki-tests--insert-by-char " text ")
@@ -203,12 +210,6 @@ Each test is constructed as three phases:
                (del:      "#section")
                (post: "<Wiki^Word>"))
 
-             ;; PASS: WikiWord -> dehighlight "WikiWo<kill-word>rd"
-             (ert-info ("8" :prefix "Verify highlighting: ")
-               (pre: "WikiWo^kill-wordrd")
-               (del:        "kill-word")
-               (post: "<WikiWo^rd>"))
-
              ;; PASS: "WikiWord#section with spaces" -> shrink highlight
              ;;        to {WikiWord#section} with this operation:
              ;;        <delete-char>"WikiWord#section with spaces"
@@ -217,12 +218,9 @@ Each test is constructed as three phases:
                (exec: #'delete-char 1)
                (post: "^<WikiWord#section> with spaces\""))
 
-             ;; PASS: "WikiWord#section"<delete-char-backwards> -> no
-             ;; highlight change "{WikiWord#section}
-             (ert-info ("10" :prefix "Verify highlighting: ")
-               (pre: "\"WikiWord#section\"^")
-               (exec: #'backward-delete-char-untabify 1)
-               (post: "\"<WikiWord#section>^"))
+             (ert-info ("10" :prefix "Verify point, no highlighting:")
+               (pre: "non^wikiword")
+               (post: "non^wikiword"))
 
              ;; PASS: "WikiWord#section with spaces"<delete-char-backwards>
              ;; -> shrink highlight to "{WikiWord#section} with spaces
@@ -253,7 +251,13 @@ Each test is constructed as three phases:
              (ert-info ("15" :prefix "Verify highlighting: ")
                (pre: "WikiWord ^<abc> abc WikiWord")
                (del:           "<abc> abc")
-               (post: "<WikiWord> ^ <WikiWord>")))
+               (post: "<WikiWord> ^ <WikiWord>"))
+
+             ;; PASS: WikiWord -> dehighlight "WikiWo<kill-word>rd"
+             (ert-info ("16" :prefix "Verify highlighting: ")
+               (pre: "WikiWo^kill-wordrd")
+               (del:        "kill-word")
+               (post: "<WikiWo^rd>")))
 
          (hy-delete-files-and-buffers (list wikiHi wikiHo)))))))
 

Reply via email to