From 636860363fc4569b3540a69efc13f354c0783e27 Mon Sep 17 00:00:00 2001 From: Michael Rees Date: Wed, 28 May 2025 22:09:10 -0500 Subject: [PATCH] Add test for assertion combined with posting date --- hledger/test/add.test | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/hledger/test/add.test b/hledger/test/add.test index 912aaef94..fba1cd7c1 100644 --- a/hledger/test/add.test +++ b/hledger/test/add.test @@ -203,7 +203,25 @@ $ rm -f nosuch.journal; hledger -f nosuch.journal add; rm -f nosuch.journal > /Save this transaction to the journal/ >2 // -## 15. shouldn't add decimals if there aren't any +## 15. Assertion combined with posting date +< +2025-05-10 +x +(a) +10 +. +y +2025-05-10 +x2 +(a) +3 = 3 ; date:2025-05-01 +. +$ rm -f nosuch.journal; hledger -f nosuch.journal add; rm -f nosuch.journal +> /\(a\)[[:space:]]+3 = 3 ; date:2025-05-01/ +>2 // + + +## 16. shouldn't add decimals if there aren't any ## printf '\n\na\n1\nb\n' | hledger -f /dev/null add # < #