diff --git a/test/src/treesit-tests.el b/test/src/treesit-tests.el index 30b15a3c0ce..5b951d35ba1 100644 --- a/test/src/treesit-tests.el +++ b/test/src/treesit-tests.el @@ -199,12 +199,14 @@ (with-current-buffer base (setq indirect (clone-indirect-buffer "*treesit test 1*" nil))) (with-current-buffer indirect - (setq parser (treesit-parser-create 'json))) - ;; 1. Parser created in the indirect buffer should be - ;; actually be created in the base buffer. + (setq parser (treesit-parser-create 'json)) + (should (equal (list parser) (treesit-parser-list)))) + ;; 1. Parser created in the indirect buffer should not appear + ;; in the base buffer. (with-current-buffer base - (should (equal (list parser) + (should (equal nil (treesit-parser-list))) + (treesit-parser-create 'json) (insert "[1,2,3]")) ;; Change in the base buffer should be reflected in the ;; indirect buffer.