mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 13:13:03 +00:00
test middle-of-buffer snippet insertion
This commit is contained in:
parent
51e9e8e53c
commit
5c76a0fda2
@ -213,6 +213,15 @@
|
||||
(yas-expand-snippet snippet)
|
||||
(should (string= (yas--buffer-contents) "#include <foo>\nmain")))))
|
||||
|
||||
(ert-deftest middle-of-buffer-snippet-insertion ()
|
||||
(with-temp-buffer
|
||||
(yas-minor-mode 1)
|
||||
(insert "beginning")
|
||||
(save-excursion (insert "end"))
|
||||
(let ((snippet "-middle-"))
|
||||
(yas-expand-snippet snippet))
|
||||
(should (string= (yas--buffer-contents) "beginning-middle-end"))))
|
||||
|
||||
(ert-deftest another-example-for-issue-271 ()
|
||||
;; expect this to fail in batch mode since `region-active-p' doesn't
|
||||
;; used by `yas-expand-snippet' doesn't make sense in that context.
|
||||
|
Loading…
x
Reference in New Issue
Block a user