@@ -1704,11 +1704,39 @@ Insert test in the middle of other text."
17041704 (p1 . t ) (p4) (-1 . " Hiho" )))))
17051705 (hy-delete-dir-and-buffer hywiki-directory)))))
17061706
1707+ (ert-deftest hywiki-tests--wikiword-step-check-edit-wikiword-in-emacs-lisp-mode ()
1708+ " Run the step check to verify WikiWord is identified under change in a docstring.
1709+ A WikiWord is completed, then last char is deleted and reinserted. The
1710+ face is verified during the change."
1711+ (hywiki-tests--preserve-hywiki-mode
1712+ (let* ((hywiki-directory (make-temp-file " hywiki" t ))
1713+ (wiki-page (cdr (hywiki-add-page " WikiWord" ))))
1714+ (unwind-protect
1715+ (progn
1716+ (hywiki-mode 1 )
1717+ (with-temp-buffer
1718+ (emacs-lisp-mode )
1719+ (insert " \
1720+ (defun func ()
1721+ \" WikiWor
1722+ t)
1723+ " )
1724+ ; ; Set point after WikiWor
1725+ (goto-char 1 )
1726+ (should (search-forward " WikiWor" ))
1727+
1728+ ; ; Complete WikiWord and verify highlighting
1729+ (hywiki-tests--run-test-case
1730+ '((" d\" " . " WikiWord" ) (p2 . t ) (-1 ) (" d" . " WikiWord" )))))
1731+ (hy-delete-file-and-buffer wiki-page)
1732+ (hy-delete-dir-and-buffer hywiki-directory)))))
1733+
17071734(ert-deftest hywiki-tests--wikiword-identified-in-emacs-lisp-mode ()
17081735 " Verify WikiWord is identified when surrounded by delimiters in `emacs-lisp-mode' ."
17091736 (hywiki-tests--preserve-hywiki-mode
1710- (let ((hsys-org-enable-smart-keys t )
1711- (hywiki-directory (make-temp-file " hywiki" t )))
1737+ (let* ((hsys-org-enable-smart-keys t )
1738+ (hywiki-directory (make-temp-file " hywiki" t ))
1739+ (wiki-page (cdr (hywiki-add-page " WikiWord" ))))
17121740 (unwind-protect
17131741 (progn
17141742 (hywiki-mode 1 )
@@ -1723,14 +1751,14 @@ Insert test in the middle of other text."
17231751 (insert (format " ;; %s " v))
17241752 (hywiki-tests--command-execute #'newline 1 'interactive )
17251753 (goto-char 9 )
1726- (should (string= " WikiWord" (hywiki-word-at))))
1754+ (should (string= " WikiWord" (hywiki-tests-- word-at))))
17271755
17281756 (with-temp-buffer
17291757 (emacs-lisp-mode )
17301758 (insert (format " (setq var \" %s \" ) " v))
17311759 (hywiki-tests--command-execute #'newline 1 'interactive )
17321760 (goto-char 16 )
1733- (should (string= " WikiWord" (hywiki-word-at)))))
1761+ (should (string= " WikiWord" (hywiki-tests-- word-at)))))
17341762
17351763 ; ; Does not match as a WikiWord
17361764 (dolist (v '(" WikiWord#" ))
@@ -1739,14 +1767,15 @@ Insert test in the middle of other text."
17391767 (insert (format " ;; %s " v))
17401768 (hywiki-tests--command-execute #'newline 1 'interactive )
17411769 (goto-char 9 )
1742- (should-not (hywiki-word-at)))
1770+ (should-not (hywiki-tests-- word-at)))
17431771
17441772 (with-temp-buffer
17451773 (emacs-lisp-mode )
17461774 (insert (format " (setq var \" %s \" ) " v))
17471775 (hywiki-tests--command-execute #'newline 1 'interactive )
17481776 (goto-char 16 )
1749- (should-not (hywiki-word-at)))))
1777+ (should-not (hywiki-tests--word-at)))))
1778+ (hy-delete-file-and-buffer wiki-page)
17501779 (hy-delete-dir-and-buffer hywiki-directory)))))
17511780
17521781(ert-deftest hywiki-tests--wikiword-identified-in-strings-in-emacs-lisp-mode ()
0 commit comments