mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-07 04:10:27 -08:00
Fix tree-sitter test for indirect parser list
* test/src/treesit-tests.el (treesit-indirect-buffer): Now the base buffer shouldn't contain indirect buffer's parsers.
This commit is contained in:
parent
4339e70a94
commit
ac98ff18f4
1 changed files with 6 additions and 4 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue