mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 21:13:04 +00:00
Test expansion in an empty buffer
* yasnippet-tests.el (yas-should-expand, yas-should-not-expand): Call `erase-buffer' instead of narrowing.
This commit is contained in:
parent
a87ec549a6
commit
14f830a37d
@ -851,7 +851,7 @@ add the snippets associated with the given mode."
|
||||
(defun yas-should-expand (keys-and-expansions)
|
||||
(dolist (key-and-expansion keys-and-expansions)
|
||||
(yas-exit-all-snippets)
|
||||
(narrow-to-region (point) (point))
|
||||
(erase-buffer)
|
||||
(insert (car key-and-expansion))
|
||||
(let ((yas-fallback-behavior nil))
|
||||
(ert-simulate-command '(yas-expand)))
|
||||
@ -865,7 +865,7 @@ add the snippets associated with the given mode."
|
||||
(defun yas-should-not-expand (keys)
|
||||
(dolist (key keys)
|
||||
(yas-exit-all-snippets)
|
||||
(narrow-to-region (point) (point))
|
||||
(erase-buffer)
|
||||
(insert key)
|
||||
(let ((yas-fallback-behavior nil))
|
||||
(ert-simulate-command '(yas-expand)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user