@@ -1704,11 +1704,39 @@ Insert test in the middle of other text."
1704
1704
(p1 . t ) (p4) (-1 . " Hiho" )))))
1705
1705
(hy-delete-dir-and-buffer hywiki-directory)))))
1706
1706
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
+
1707
1734
(ert-deftest hywiki-tests--wikiword-identified-in-emacs-lisp-mode ()
1708
1735
" Verify WikiWord is identified when surrounded by delimiters in `emacs-lisp-mode' ."
1709
1736
(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" ))))
1712
1740
(unwind-protect
1713
1741
(progn
1714
1742
(hywiki-mode 1 )
@@ -1723,14 +1751,14 @@ Insert test in the middle of other text."
1723
1751
(insert (format " ;; %s " v))
1724
1752
(hywiki-tests--command-execute #'newline 1 'interactive )
1725
1753
(goto-char 9 )
1726
- (should (string= " WikiWord" (hywiki-word-at))))
1754
+ (should (string= " WikiWord" (hywiki-tests-- word-at))))
1727
1755
1728
1756
(with-temp-buffer
1729
1757
(emacs-lisp-mode )
1730
1758
(insert (format " (setq var \" %s \" ) " v))
1731
1759
(hywiki-tests--command-execute #'newline 1 'interactive )
1732
1760
(goto-char 16 )
1733
- (should (string= " WikiWord" (hywiki-word-at)))))
1761
+ (should (string= " WikiWord" (hywiki-tests-- word-at)))))
1734
1762
1735
1763
; ; Does not match as a WikiWord
1736
1764
(dolist (v '(" WikiWord#" ))
@@ -1739,14 +1767,15 @@ Insert test in the middle of other text."
1739
1767
(insert (format " ;; %s " v))
1740
1768
(hywiki-tests--command-execute #'newline 1 'interactive )
1741
1769
(goto-char 9 )
1742
- (should-not (hywiki-word-at)))
1770
+ (should-not (hywiki-tests-- word-at)))
1743
1771
1744
1772
(with-temp-buffer
1745
1773
(emacs-lisp-mode )
1746
1774
(insert (format " (setq var \" %s \" ) " v))
1747
1775
(hywiki-tests--command-execute #'newline 1 'interactive )
1748
1776
(goto-char 16 )
1749
- (should-not (hywiki-word-at)))))
1777
+ (should-not (hywiki-tests--word-at)))))
1778
+ (hy-delete-file-and-buffer wiki-page)
1750
1779
(hy-delete-dir-and-buffer hywiki-directory)))))
1751
1780
1752
1781
(ert-deftest hywiki-tests--wikiword-identified-in-strings-in-emacs-lisp-mode ()
0 commit comments