Add test for indentation of single line mirrors

* yasnippet-tests.el (indent-mirrors-on-update): New test.
This commit is contained in:
Noam Postavsky 2016-06-24 16:19:22 -04:00
parent d218ed8b1b
commit 9c9952c19a

View File

@ -240,6 +240,16 @@ $1 ------------------------")
XXXXX ---------------- XXXXX ----
XXXXX ------------------------"))))
(ert-deftest indent-mirrors-on-update ()
"Check that mirrors are always kept indented."
(with-temp-buffer
(ruby-mode)
(yas-minor-mode 1)
(yas-expand-snippet "def $1\n$1\nend")
(yas-mock-insert "xxx")
;; Assuming 2 space indent.
(should (string= "def xxx\n xxx\nend" (buffer-string)))))
(ert-deftest snippet-with-multiline-mirrors-issue-665 ()
"In issue 665, a multi-line mirror is attempted."