From a6bd1145911221932bc1c476404ef7be34f70006 Mon Sep 17 00:00:00 2001 From: "Aaron L. Zeng" Date: Sun, 24 Mar 2024 11:16:32 -0400 Subject: [PATCH] Add BROKEN regression test for #374 --- test/state-test.el | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/test/state-test.el b/test/state-test.el index 77db3213..229c8c95 100644 --- a/test/state-test.el +++ b/test/state-test.el @@ -135,6 +135,32 @@ https://github.com/ledger/ledger-mode/issues/274" Expenses:Food:Groceries $ 44.00 ; hastag: not block Assets:Checking")))) + +(ert-deftest ledger-state/test-004 () + "Regression test for #374 +https://github.com/ledger/ledger-mode/issues/374" + + (ledger-tests-with-temp-file + "2024/01/01 Test + Expenses $4.00 + Assets + +;; Some comments. +;; Try hitting `ledger-toggle-current' from this line +" + (setq ledger-clear-whole-transactions t) + (goto-char (1- (point-max))) + (ledger-toggle-current) + (should + (equal (buffer-string) + "2024/01/01 Test + Expenses $4.00 + Assets + +;; Some comments. +;; Try hitting `ledger-toggle-current' from this line +")))) + (provide 'state-test) ;;; state-test.el ends here