mirror of
https://github.com/joaotavora/yasnippet.git
synced 2026-02-04 14:32:26 +00:00
test middle-of-buffer snippet insertion
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user