diff options
| author | Stefan Kangas | 2023-02-12 03:27:46 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2023-02-12 03:27:46 +0100 |
| commit | 08bd066149faee95fe6660d5002306a1dbc4b91b (patch) | |
| tree | 6fc5a9ecbcee5b59aa377fa90f7f729a0a8c6e31 /test/src | |
| parent | 14c97db7366435b1edbf2854f485058a9d7c6071 (diff) | |
| parent | 4da398d8b57aae740f054b4d04cba72735a4044c (diff) | |
| download | emacs-08bd066149faee95fe6660d5002306a1dbc4b91b.tar.gz emacs-08bd066149faee95fe6660d5002306a1dbc4b91b.zip | |
Merge from origin/emacs-29
4da398d8b57 ; Fix typos
074008ee2d2 ; Fix doc strings in lisp/image/ directory
2d1e43436da ; Improve documentation of hash functions.
900f7e07275 ; Remove extraneous local variables from image-dired-*.el...
4f053afe8e7 bug-reference: prevent match-data clobbering (bug#61395)
10af9fbcad1 ; * admin/notes/tree-sitter/starter-guide: Typos.
9ac242ce93d ; Fix recent changes in treesit docs
f5789aefc2e Rename LIMIT to DEPTH in tree-sitter functions (bug#61231)
b39821fdcef ; Fix incorrect function name in treesit manual
51901736965 Add 'live' property to treesit-node-check (bug#61235)
56960a6558b Update to Transient v0.3.7-205-gb8ad0da
68a6b364d1c Fix 'rmail-summary-output'
67c6ec25590 lisp-mode: add docstring recognition for more common lisp...
417a8ed8b05 ; Improve discoverability of empty file names handling
e47cf6ca15a Update to Transient v0.3.7-204-gecff8c2
b04cce02ff4 Fix Scala entry in Eglot's DB of LSP servers
# Conflicts:
# lisp/transient.el
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/treesit-tests.el | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/src/treesit-tests.el b/test/src/treesit-tests.el index a2ab3be7cd8..5aa12e8aa0e 100644 --- a/test/src/treesit-tests.el +++ b/test/src/treesit-tests.el | |||
| @@ -100,6 +100,7 @@ | |||
| 100 | (should (eq nil (treesit-node-check root-node 'missing))) | 100 | (should (eq nil (treesit-node-check root-node 'missing))) |
| 101 | (should (eq nil (treesit-node-check root-node 'extra))) | 101 | (should (eq nil (treesit-node-check root-node 'extra))) |
| 102 | (should (eq nil (treesit-node-check root-node 'has-error))) | 102 | (should (eq nil (treesit-node-check root-node 'has-error))) |
| 103 | (should (eq t (treesit-node-check root-node 'live))) | ||
| 103 | ;; `treesit-node-child'. | 104 | ;; `treesit-node-child'. |
| 104 | (setq doc-node (treesit-node-child root-node 0)) | 105 | (setq doc-node (treesit-node-child root-node 0)) |
| 105 | (should (equal "array" (treesit-node-type doc-node))) | 106 | (should (equal "array" (treesit-node-type doc-node))) |
| @@ -160,7 +161,18 @@ | |||
| 160 | :type 'args-out-of-range) | 161 | :type 'args-out-of-range) |
| 161 | ;; `treesit-node-eq'. | 162 | ;; `treesit-node-eq'. |
| 162 | (should (treesit-node-eq root-node root-node)) | 163 | (should (treesit-node-eq root-node root-node)) |
| 163 | (should (not (treesit-node-eq root-node doc-node)))))) | 164 | (should (not (treesit-node-eq root-node doc-node))) |
| 165 | |||
| 166 | ;; Further test for `treesit-node-check'. | ||
| 167 | (treesit-parser-delete parser) | ||
| 168 | (should (equal nil (treesit-node-check root-node 'live))) | ||
| 169 | ;; Recreate parser. | ||
| 170 | (setq parser (treesit-parser-create 'json)) | ||
| 171 | (setq root-node (treesit-parser-root-node | ||
| 172 | parser)) | ||
| 173 | (should (equal t (treesit-node-check root-node 'live))) | ||
| 174 | (kill-buffer) | ||
| 175 | (should (equal nil (treesit-node-check root-node 'live)))))) | ||
| 164 | 176 | ||
| 165 | ;;; Indirect buffer | 177 | ;;; Indirect buffer |
| 166 | 178 | ||