; * test/src/treesit-tests.el (treesit-misc): Remove test.

This test is for treesit--setting-for-mode, which is removed when we
switched from using treesit-settings to using separate major modes.
This commit is contained in:
Yuan Fu 2022-11-21 13:34:38 -08:00
parent eb1a35adc1
commit 3f37f6b435
No known key found for this signature in database
GPG key ID: 56E19BC57664A442

View file

@ -522,27 +522,6 @@ visible_end.)"
(insert "]")
(should (treesit-node-check array-node 'outdated))))
(ert-deftest treesit-misc ()
"Misc helper functions."
(skip-unless (treesit-available-p))
(let ((settings '((t 0 t)
(c-mode 1 t)
(text-mode 2 nil)
(prog-mode 3 t)
(fundamental-mode 4 t))))
;; `treesit--setting-for-mode'.
;; Exact match.
(should (eq 1 (treesit--setting-for-mode 'c-mode settings)))
;; Inherit from t.
(should (eq 0 (treesit--setting-for-mode 'non-exist settings)))
;; Inherit from prog-mode rather than fundamental-mode.
(require 'elisp-mode)
(should (eq 3 (treesit--setting-for-mode 'emacs-lisp-mode settings)))
;; Not inherit from text-mode.
(require 'outline)
(should (not (eq 2 (treesit--setting-for-mode 'outline-mode settings))))
))
;; TODO
;; - Functions in treesit.el
;; - treesit-load-name-override-list