mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 13:13:03 +00:00
Add test for indentation of single line mirrors
* yasnippet-tests.el (indent-mirrors-on-update): New test.
This commit is contained in:
parent
d218ed8b1b
commit
9c9952c19a
@ -240,6 +240,16 @@ $1 ------------------------")
|
|||||||
XXXXX ---------------- XXXXX ----
|
XXXXX ---------------- 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 ()
|
(ert-deftest snippet-with-multiline-mirrors-issue-665 ()
|
||||||
"In issue 665, a multi-line mirror is attempted."
|
"In issue 665, a multi-line mirror is attempted."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user