]> code.delx.au - gnu-emacs-elpa/commitdiff
Fix: enclose this test in WITH-TEMP-BUFFER
authorJoão Távora <joaotavora@gmail.com>
Tue, 25 Dec 2012 04:25:16 +0000 (04:25 +0000)
committerJoão Távora <joaotavora@gmail.com>
Tue, 25 Dec 2012 04:30:26 +0000 (04:30 +0000)
yasnippet-tests.el

index 0af145229290985c6e0822413be503bbc16904dc..6d57d866b61d5aa1c40254c08ea2dfed178fe818 100644 (file)
                      "brother from another bla!"))))
 
 (ert-deftest mirrors-adjacent-to-fields-with-nested-mirrors ()
-  (with-temp-buffer)
-  (yas-minor-mode 1)
-  (yas-expand-snippet "<%= f.submit \"${1:Submit}\"${2:$(and (yas-text) \", :disable_with => '\")}${2:$1ing...}${2:$(and (yas-text) \"'\")} %>")
-  (should (string= (yas--buffer-contents)
-                   "<%= f.submit \"Submit\", :disable_with => 'Submiting...' %>"))
-  (ert-simulate-command `(yas-mock-insert "Send"))
-  (should (string= (yas--buffer-contents)
-                   "<%= f.submit \"Send\", :disable_with => 'Sending...' %>")))
+  (with-temp-buffer
+    (yas-minor-mode 1)
+    (yas-expand-snippet "<%= f.submit \"${1:Submit}\"${2:$(and (yas-text) \", :disable_with => '\")}${2:$1ing...}${2:$(and (yas-text) \"'\")} %>")
+    (should (string= (yas--buffer-contents)
+                     "<%= f.submit \"Submit\", :disable_with => 'Submiting...' %>"))
+    (ert-simulate-command `(yas-mock-insert "Send"))
+    (should (string= (yas--buffer-contents)
+                     "<%= f.submit \"Send\", :disable_with => 'Sending...' %>"))))
 
 (ert-deftest deep-nested-mirroring-issue-351 ()
   (with-temp-buffer