branch: externals/hyperbole
commit a4da170b4104e06fde67b319682b8f79ffcd3ebc
Author: Mats Lidell <mats.lid...@lidells.se>
Commit: Mats Lidell <mats.lid...@lidells.se>

    Add test for WikiWords in strings in emacs lisp mode
    
    Test fails so it placed behind the failure flag to allow debugging
    without breaking CI.
---
 ChangeLog            |  7 +++++++
 test/hywiki-tests.el | 20 ++++++++++++++++++++
 2 files changed, 27 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 11ca24c925..1dfd04686f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2025-04-17  Mats Lidell  <ma...@gnu.org>
+
+* test/hywiki-tests.el
+    (hywiki-tests--wikiword-identified-in-strings-in-emacs-lisp-mode): Add
+    test for WikiWords in strings in emacs-lisp-mode. Test is behind
+    failure flag.
+
 2025-04-15  Mats Lidell  <ma...@gnu.org>
 
 * test/hywiki-tests.el (hywiki-tests--command)
diff --git a/test/hywiki-tests.el b/test/hywiki-tests.el
index 3dd41745aa..c38bc74f47 100644
--- a/test/hywiki-tests.el
+++ b/test/hywiki-tests.el
@@ -1441,6 +1441,26 @@ Insert test in the middle of other text."
                 (should-not (hywiki-word-at)))))
         (hy-delete-dir-and-buffer hywiki-directory)))))
 
+(ert-deftest hywiki-tests--wikiword-identified-in-strings-in-emacs-lisp-mode ()
+  "Verify WikiWord is identified when in strings in `emacs-lisp-mode'."
+  (skip-unless hy-test-run-failing-flag)
+  (hywiki-tests--preserve-hywiki-mode
+    (unwind-protect
+        (let ((words '("Foo" "Bar" "Baz" "Qux")))
+          (hywiki-mode 1)
+          (with-temp-buffer
+            (emacs-lisp-mode)
+            (insert
+             (format "\
+(defun a ()
+  \"%s.\"
+  nil)
+" (mapconcat 'identity words " ")))
+            (goto-line 2)
+            (dolist (v words)
+              (should (search-forward v))
+              (should (string= v (hywiki-word-at)))))))))
+
 (provide 'hywiki-tests)
 
 ;; This file can't be byte-compiled without the `el-mock' package

Reply via email to