From: Yuan Fu Date: Tue, 13 Dec 2022 02:14:30 +0000 (-0800) Subject: ; * test/src/treesit-tests.el: Add outline headers. X-Git-Tag: emacs-29.0.90~1208 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a5272e2a7cc;p=emacs.git ; * test/src/treesit-tests.el: Add outline headers. --- diff --git a/test/src/treesit-tests.el b/test/src/treesit-tests.el index 1cc2217bd3b..188a9557928 100644 --- a/test/src/treesit-tests.el +++ b/test/src/treesit-tests.el @@ -54,6 +54,7 @@ (declare-function treesit-node-descendant-for-range "treesit.c") (declare-function treesit-node-eq "treesit.c") +;;; Basic API (ert-deftest treesit-basic-parsing () "Test basic parsing routines." @@ -161,6 +162,8 @@ (should (treesit-node-eq root-node root-node)) (should (not (treesit-node-eq root-node doc-node)))))) +;;; Indirect buffer + (ert-deftest treesit-indirect-buffer () "Tests for indirect buffers." (skip-unless (treesit-language-available-p 'json)) @@ -195,6 +198,8 @@ (kill-buffer base) (kill-buffer indirect)))) +;;; Query + (ert-deftest treesit-query-api () "Tests for query API." (skip-unless (treesit-language-available-p 'json)) @@ -249,6 +254,8 @@ '((type field: (_) @capture :anchor) :? :* :+ "return"))))))) +;;; Narrow + (ert-deftest treesit-narrow () "Tests if narrowing works." (skip-unless (treesit-language-available-p 'json)) @@ -385,6 +392,8 @@ visible_end.)" ;; that calls that. ))) +;;; Range + (ert-deftest treesit-range () "Tests if range works." (skip-unless (treesit-language-available-p 'json)) @@ -438,6 +447,8 @@ visible_end.)" ;; TODO: More tests. ))) +;;; Multiple language + (ert-deftest treesit-multi-lang () "Tests if parsing multiple language works." (skip-unless (and (treesit-language-available-p 'html) @@ -474,6 +485,8 @@ visible_end.)" ;; TODO: More tests. ))) +;;; Supplemental functions + (ert-deftest treesit-parser-supplemental () "Supplemental node functions." (skip-unless (treesit-language-available-p 'json))