mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
; 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.
This commit is contained in:
parent
9261d353cc
commit
b84e306be7
1 changed files with 3 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue