emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 6268cc2 014/177: add: test for issue #404


From: João Távora
Subject: [elpa] master 6268cc2 014/177: add: test for issue #404
Date: Sat, 28 Mar 2015 15:40:30 +0000

branch: master
commit 6268cc26b3cfa30c4b39dc1edaa3aedb98422184
Author: Joao Tavora <address@hidden>
Commit: Joao Tavora <address@hidden>

    add: test for issue #404
---
 yasnippet-tests.el |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/yasnippet-tests.el b/yasnippet-tests.el
index 7349d6f..c5d8738 100644
--- a/yasnippet-tests.el
+++ b/yasnippet-tests.el
@@ -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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]