From bcde95910508ebf57579a8d7dd8b04ce5d98bc13 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Tue, 3 Jun 2025 07:48:38 -1000 Subject: [PATCH] ;dev: tests for amt:/cur: with balance commands [#2396] --- hledger/test/balance/balance-amt.test | 12 ++++++++++++ hledger/test/balance/balance-cur.test | 12 ++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 hledger/test/balance/balance-amt.test create mode 100644 hledger/test/balance/balance-cur.test diff --git a/hledger/test/balance/balance-amt.test b/hledger/test/balance/balance-amt.test new file mode 100644 index 000000000..7352dc496 --- /dev/null +++ b/hledger/test/balance/balance-amt.test @@ -0,0 +1,12 @@ +# * balance commands with amt: query + +< +2025-01-01 + a 1 A + a 1 B + b + +# ** 1. amt: filters postings correctly +$ hledger -f - balance -N 'amt:>0' + 1 A + 1 B a diff --git a/hledger/test/balance/balance-cur.test b/hledger/test/balance/balance-cur.test new file mode 100644 index 000000000..30ad48430 --- /dev/null +++ b/hledger/test/balance/balance-cur.test @@ -0,0 +1,12 @@ +# * balance commands with cur: query + +< +2025-01-01 + a 1 A + a 1 B + b + +# ** 1. cur: filters postings correctly +$ hledger -f - balance -N cur:A + 1 A a + -1 A b