From 9d2d8ac24faae4301bd3a2951554972d6ec5af5b Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sun, 6 Jun 2021 18:15:51 -1000 Subject: [PATCH] ;balcmds: clarify tests a little for #1566 --- hledger/test/balance/balance.test | 16 +++++++++++++++- hledger/test/balancesheet.test | 4 ++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/hledger/test/balance/balance.test b/hledger/test/balance/balance.test index 7401e8034..9a544aa1e 100644 --- a/hledger/test/balance/balance.test +++ b/hledger/test/balance/balance.test @@ -143,7 +143,7 @@ hledger -f - balance -b 2016/10 -e 2016/11 >>>2 >>>= 0 -# 7. Test csv output +# 7. Default CSV output. hledger -f - balance -N --output-format=csv <<< 2021-01-01 Test @@ -154,3 +154,17 @@ hledger -f - balance -N --output-format=csv "Assets:ABC","""AB.C"" 1" "Assets:Cash","$-1" >>>= 0 + +# 8. CSV output always shows full account names, even in tree mode (#1565). +hledger -f - balance -N --output-format=csv --tree +<<< +2021-01-01 Test + Assets:ABC "AB.C" 1 + Assets:Cash -$1 +>>> +"account","balance" +"Assets","$-1, ""AB.C"" 1" +"Assets:ABC","""AB.C"" 1" +"Assets:Cash","$-1" +>>>= 0 + diff --git a/hledger/test/balancesheet.test b/hledger/test/balancesheet.test index 2e6e2618f..a900aa7c8 100644 --- a/hledger/test/balancesheet.test +++ b/hledger/test/balancesheet.test @@ -306,7 +306,7 @@ Balance Sheet 2020-03-25 =============++============ Net: || $1 -# 12. Check csv output (for tree mode) (#1566) +# 12. CSV output. It always shows full account names, even in tree mode (#1566). $ hledger -f - balancesheet --tree --output-format=csv "Balance Sheet 2020-03-25","" "Account","2020-03-25" @@ -317,7 +317,7 @@ $ hledger -f - balancesheet --tree --output-format=csv "total" "Net:","$1" -# 13. Check csv output (for tree mode) with dropping +# 13. CSV output supports --drop. $ hledger -f - balancesheet --tree --output-format=csv --drop 1 "Balance Sheet 2020-03-25","" "Account","2020-03-25"