branch: externals/hyperbole commit f8870db3c056ea0a66d348d40b1a0991dca1b7d3 Merge: e740c76873 da5dd75a03 Author: Robert Weiner <r...@gnu.org> Commit: GitHub <nore...@github.com>
Merge pull request #703 from rswgnu/add-failing-test-behind-failure-flag Add test for WikiWords in strings in emacs lisp mode --- ChangeLog | 5 +++++ test/hywiki-tests.el | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0e61e3885c..ef1624a64a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +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. + * man/im/*.eps: Remove embedded postscript files. * HY-TALK/improve-performance.png: Not used. 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