summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorYuan Fu <casouri@gmail.com>2023-04-13 19:18:52 -0700
committerYuan Fu <casouri@gmail.com>2023-04-13 19:18:52 -0700
commitd664969544b13fe93a548c9908ce566f9b5cde9c (patch)
tree60afb54516199b6ed05aef0edd32f10fe5d434b3 /test
parentde34de3b35cbe1da6fb035b93081e0564b3c7b3f (diff)
downloademacs-d664969544b13fe93a548c9908ce566f9b5cde9c.tar.gz
Fix tree-sitter test
* test/src/treesit-tests.el: (treesit-search-forward-predicate-invalid-predicate): Fix test.
Diffstat (limited to 'test')
-rw-r--r--test/src/treesit-tests.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/src/treesit-tests.el b/test/src/treesit-tests.el
index 34f9f15beaa..ecdee3c26e4 100644
--- a/test/src/treesit-tests.el
+++ b/test/src/treesit-tests.el
@@ -378,13 +378,13 @@ BODY is the test body."
"Test tree-sitter's ability to detect invalid predicates."
(skip-unless (treesit-language-available-p 'json))
(treesit--ert-search-setup
- (dolist (pred '( 1 (not 1) (not "2" "3") (or) (or 1)))
+ (dolist (pred '( 1 (not 1) (not "2" "3") (or) (or 1) 'a))
(should-error (treesit-search-forward (treesit-node-child array 0)
pred)
:type 'treesit-invalid-predicate))
(should-error (treesit-search-forward (treesit-node-child array 0)
- 'not-a-function)
- :type 'void-function)))
+ (lambda (node) (car node)))
+ :type 'wrong-type-argument)))
(ert-deftest treesit-cursor-helper-with-missing-node ()
"Test treesit_cursor_helper with a missing node."