mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-21 06:55:39 +00:00
; Add even more tests for previous commit
* test/src/treesit-tests.el: (treesit-range-fixup-after-edit): Make the tests trickier.
This commit is contained in:
parent
460b9d705a
commit
ae22ad7f62
@ -711,21 +711,23 @@ visible_end.)"
|
||||
(should (equal (treesit-parser-included-ranges parser)
|
||||
'((5 . 7) (10 . 13))))
|
||||
|
||||
;; Narrow in front.
|
||||
;; Narrow in front, and discard the last one.
|
||||
(widen)
|
||||
(treesit-parser-set-included-ranges parser '((4 . 17)))
|
||||
(treesit-parser-set-included-ranges
|
||||
parser '((4 . 10) (12 . 14) (16 . 20)))
|
||||
;; 11111111111111111111
|
||||
;; [ ]
|
||||
;; [ ] [ ] [ ]
|
||||
;; { } narrow
|
||||
(narrow-to-region 1 8)
|
||||
(should (equal (treesit-parser-included-ranges parser)
|
||||
'((4 . 8))))
|
||||
|
||||
;; Narrow in back.
|
||||
;; Narrow in back, and discard the first one.
|
||||
(widen)
|
||||
(treesit-parser-set-included-ranges parser '((4 . 17)))
|
||||
(treesit-parser-set-included-ranges
|
||||
parser '((1 . 5) (7 . 9) (11 . 17)))
|
||||
;; 11111111111111111111
|
||||
;; [ ]
|
||||
;; [ ] [ ] [ ]
|
||||
;; { } narrow
|
||||
(narrow-to-region 15 20)
|
||||
(should (equal (treesit-parser-included-ranges parser)
|
||||
|
Loading…
Reference in New Issue
Block a user