mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 13:13:03 +00:00
add: test for issue #404
This commit is contained in:
parent
90d4cae1b1
commit
6268cc26b3
@ -204,6 +204,15 @@
|
||||
(ert-simulate-command `(yas-mock-insert "bbb"))
|
||||
(should (string= (yas--buffer-contents) "if condition\naaa\nelse\nbbb\nend")))))
|
||||
|
||||
(ert-deftest example-for-issue-404 ()
|
||||
(with-temp-buffer
|
||||
(c++-mode)
|
||||
(yas-minor-mode 1)
|
||||
(insert "#include <foo>\n")
|
||||
(let ((snippet "main"))
|
||||
(yas-expand-snippet snippet)
|
||||
(should (string= (yas--buffer-contents) "#include <foo>\nmain")))))
|
||||
|
||||
(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