branch: externals/hyperbole
commit cfe9c7deec6f2abbc0d9642d322ec18f6a85cafa
Merge: 37355feece 2a506b3808
Author: Robert Weiner <[email protected]>
Commit: GitHub <[email protected]>
Merge pull request #898 from rswgnu/pr_add_org_in_buffer_test
Add org in buffer completion test
---
ChangeLog | 4 ++++
test/hywiki-tests.el | 14 ++++++++++++++
2 files changed, 18 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 9abd74230f..0d7678a182 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2026-03-11 Mats Lidell <[email protected]>
+
+* test/hywiki-tests.el (hywiki-tests--org-in-buffer-completion): Add test.
+
2026-03-09 Bob Weiner <[email protected]>
* hywiki.el (hywiki-word-add-completion-at-point):
diff --git a/test/hywiki-tests.el b/test/hywiki-tests.el
index e8329c0378..0bea7a6914 100644
--- a/test/hywiki-tests.el
+++ b/test/hywiki-tests.el
@@ -2275,6 +2275,20 @@ expected result."
(with-current-buffer (find-file-noselect wiki-page)
(hooks-removed: "In wiki-page"))))))
+(ert-deftest hywiki-tests--org-in-buffer-completion ()
+ "Verify org in buffer completion works with `hywiki-mode'."
+ (hywiki-tests--preserve-hywiki-mode
+ (let ((hsys-org-enable-smart-keys t))
+ (org-mode)
+ (hywiki-tests--insert "* Header\n\n[[*")
+ (execute-kbd-macro (kbd "TAB"))
+ (save-excursion
+ (beginning-of-line)
+ (should (looking-at-p (regexp-quote "[[*Header"))))
+ (ert-with-message-capture cap
+ (execute-kbd-macro (kbd "TAB"))
+ (should (string= "Sole completion\n" cap))))))
+
(provide 'hywiki-tests)
;; This file can't be byte-compiled without the `el-mock' package