branch: elpa/beancount commit d464468aa28b6f8c6dd4efe7eef8d41760067e19 Author: Daniele Nicolodi <dani...@grinta.net> Commit: Daniele Nicolodi <dani...@grinta.net>
beancount.el: Add indentation tests --- beancount-tests.el | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/beancount-tests.el b/beancount-tests.el index 10e1b4d58d..75981a547e 100644 --- a/beancount-tests.el +++ b/beancount-tests.el @@ -111,3 +111,24 @@ Return a list of substrings each followed by its face." "Expenses:Example" beancount-account "1.00 USD" beancount-amount "Assets:Checking" beancount-account))) + +(ert-deftest beancount/indent-001 () + :tags '(indent regress) + (with-temp-buffer + (insert " +2019-01-01 * \"Example\" + #foo + ^bar + Expenses:Example 1.00 USD + Assets:Checking 1.00 USD +") + (beancount-mode) + (previous-line) + (beancount-indent-transaction) + (should (equal (buffer-string) " +2019-01-01 * \"Example\" + #foo + ^bar + Expenses:Example 1.00 USD + Assets:Checking 1.00 USD +"))))