From ef89b67d7a417bd0243157c9482d0e35288154f3 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sun, 3 Aug 2025 07:55:43 +0100 Subject: [PATCH] dev: accounts: more tag: tests --- hledger/test/accounts.test | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/hledger/test/accounts.test b/hledger/test/accounts.test index 252bd69bb..8223f4072 100644 --- a/hledger/test/accounts.test +++ b/hledger/test/accounts.test @@ -93,13 +93,21 @@ trade:A-B:B a b -# ** 11. A tag: query only matches account tags, not posting tags. +# ** 11. When matching accounts found in postings, tag: only matches the account's tags, +# not posting tags. < -account a ; t: +account a ; a:, this account has tag a +account a:b ; b:, this account has tag b and inherited tag a 2025-01-01 - a 1 - b -1 ; t: + a 1 + a:b 2 + c -3 ; p:, this posting has tag p -$ hledger -f- accounts tag:t +$ hledger -f- accounts tag:b +a:b + +# ** 12. tag: also matches tags inherited from parent accounts, currently. +$ hledger -f- accounts tag:a a +a:b