From f1469d95e6101abfa25da7c1974d84119990b4f6 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 5 May 2025 15:07:28 +0300 Subject: [PATCH] ; Fix recently added treesit tests * test/src/treesit-tests.el (treesit-linecol-basic) (treesit-linecol-search-back-across-newline) (treesit-linecol-col-same-line): Skip tests if tree-sitter is not available. (cherry picked from commit b84e306be765d5071577f81a12f9557e64732ecf) --- test/src/treesit-tests.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/src/treesit-tests.el b/test/src/treesit-tests.el index 36853487439..56e40b98825 100644 --- a/test/src/treesit-tests.el +++ b/test/src/treesit-tests.el @@ -228,6 +228,7 @@ (ert-deftest treesit-linecol-basic () "Tests for basic lincol synchronization." + (skip-unless (fboundp 'treesit--linecol-cache)) (with-temp-buffer (should (equal (treesit--linecol-cache) '(:line 0 :col 0 :bytepos 0))) @@ -271,6 +272,7 @@ (ert-deftest treesit-linecol-search-back-across-newline () "Search for newline backwards." + (skip-unless (fboundp 'treesit--linecol-at)) (with-temp-buffer (insert "\n ") (treesit--linecol-cache-set 2 1 3) @@ -280,6 +282,7 @@ (ert-deftest treesit-linecol-col-same-line () "Test col calculation when cache and target pos is in the same line." + (skip-unless (fboundp 'treesit--linecol-at)) (with-temp-buffer (insert "aaaaaa") (treesit--linecol-cache-set 1 5 6) -- 2.39.5