]> code.delx.au - gnu-emacs-elpa/blobdiff - yasnippet-tests.el
Document $> and fix escaping
[gnu-emacs-elpa] / yasnippet-tests.el
index 8ba4632d3af865dd63411daee1a6ca42e796f9a4..9d2074aa4f0b6a102e55adf9de9eebf126a5f09d 100644 (file)
@@ -215,6 +215,19 @@ end" (buffer-string)))
 end" (buffer-string)))
     (should (= 4 (current-column)))))
 
+(ert-deftest indentation-markers ()
+  "Test a snippet with indentation markers (`$<')."
+  (with-temp-buffer
+    (ruby-mode)
+    (yas-minor-mode 1)
+    (set (make-local-variable 'yas-indent-line) nil)
+    (yas-expand-snippet "def ${1:method}${2:(${3:args})}\n$>Indent\nNo indent\\$>\nend")
+    (should (string= "def method(args)
+  Indent
+No indent$>
+end" (buffer-string)))))
+
+
 (ert-deftest navigate-a-snippet-with-multiline-mirrors-issue-665 ()
   "In issue 665, a multi-line mirror is attempted.