emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master ac98ff18f4d 2/3: Fix tree-sitter test for indirect parser list


From: Yuan Fu
Subject: master ac98ff18f4d 2/3: Fix tree-sitter test for indirect parser list
Date: Sat, 24 Aug 2024 18:27:31 -0400 (EDT)

branch: master
commit ac98ff18f4debb935e07d3739fcc3378359d8d82
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>

    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.
---
 test/src/treesit-tests.el | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]