From a5272e2a7cc77f17efa144c5482dcfcb62d563d3 Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Mon, 12 Dec 2022 18:14:30 -0800 Subject: [PATCH] ; * test/src/treesit-tests.el: Add outline headers. --- test/src/treesit-tests.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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)) -- 2.39.2