branch: master
commit 14f830a37dd146fb0671f20119d968837c4a8b11
Author: Noam Postavsky <[email protected]>
Commit: Noam Postavsky <[email protected]>
Test expansion in an empty buffer
* yasnippet-tests.el (yas-should-expand, yas-should-not-expand): Call
`erase-buffer' instead of narrowing.
---
yasnippet-tests.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/yasnippet-tests.el b/yasnippet-tests.el
index e5c72df..cb5bd47 100644
--- a/yasnippet-tests.el
+++ b/yasnippet-tests.el
@@ -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)))