From 3e7d2881a9466bf177f188e201170b29f2b78343 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 11 Dec 2025 03:49:05 +0000 Subject: [PATCH] Fix test comments and add version checks for search functions Co-authored-by: Kinneyzhang <38454496+Kinneyzhang@users.noreply.github.com> --- tp-ert-tests.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tp-ert-tests.el b/tp-ert-tests.el index cdf5604..e8eb804 100644 --- a/tp-ert-tests.el +++ b/tp-ert-tests.el @@ -203,7 +203,7 @@ (should (assoc 'layer1 tp-layer-alist)) (should (assoc 'layer2 tp-layer-alist)) (should (assoc 'layer3 tp-layer-alist)) - ;; Note: tp-group-define stores layers in reverse order (last defined is first) + ;; Check all layers are present in the group (let ((layers (cdr (assoc 'my-group tp-layer-groups)))) (should (= (length layers) 3)) (should (memq 'layer1 layers)) @@ -524,6 +524,8 @@ (insert "Hello World") (tp-put 7 12 'face 'bold) (goto-char 1) + ;; text-property-search-forward may not exist in all Emacs versions + (skip-unless (fboundp 'text-property-search-forward)) (let ((match (tp-forward 'face))) (should match) (should (= (prop-match-beginning match) 7)))))