From b9571bd088cc0785f7797a79c84c9602fd990334 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 27 Jul 2017 08:52:49 -0700 Subject: [PATCH] bal/bs/cf/is: consistently separate columns with a double space Previously, amounts wider than the column headings would be separated by only a single space. Also there was an extra space before the first column. --- hledger/Hledger/Cli/Balance.hs | 2 +- hledger/Text/Tabular/AsciiWide.hs | 4 +- tests/balance/219.test | 14 +- tests/balance/373-layout.test | 28 +-- tests/balance/depth.test | 10 +- tests/balance/intervals.test | 206 ++++++++++----------- tests/balance/pretty.test | 14 +- tests/balancesheet/balancesheet.test | 194 +++++++++---------- tests/cashflow/cashflow.test | 64 +++---- tests/i18n/wide-char-layout.test | 16 +- tests/incomestatement/incomestatement.test | 68 +++---- 11 files changed, 310 insertions(+), 310 deletions(-) diff --git a/hledger/Hledger/Cli/Balance.hs b/hledger/Hledger/Cli/Balance.hs index ee9f96ff1..8af9d4056 100644 --- a/hledger/Hledger/Cli/Balance.hs +++ b/hledger/Hledger/Cli/Balance.hs @@ -502,7 +502,7 @@ renderBalanceReportTable (ReportOpts { pretty_tables_ = pretty, color_=usecolor . addtrailingblank . trimborder . lines - . render pretty id (" " ++) showamt + . render pretty id id showamt . align where addtrailingblank = (++[""]) diff --git a/hledger/Text/Tabular/AsciiWide.hs b/hledger/Text/Tabular/AsciiWide.hs index 9cb9e9201..60733cfd3 100644 --- a/hledger/Text/Tabular/AsciiWide.hs +++ b/hledger/Text/Tabular/AsciiWide.hs @@ -70,7 +70,7 @@ renderColumns pretty is h = leftBar pretty ++ coreLine ++ rightBar pretty coreLine = concatMap helper $ flattenHeader $ zipHeader 0 is h helper = either hsep (uncurry padLeftWide) hsep :: Properties -> String - hsep NoLine = " " + hsep NoLine = " " hsep SingleLine = midBar pretty hsep DoubleLine = doubleMidBar pretty @@ -98,7 +98,7 @@ renderHLine' pretty prop is sep h = [ cross pretty, sep ] ++ coreLine ++ [sep, c coreLine = concatMap helper $ flattenHeader $ zipHeader 0 is h helper = either vsep dashes dashes (i,_) = replicate i sep - vsep NoLine = [sep] + vsep NoLine = replicate 2 sep -- match the double space sep in renderColumns vsep SingleLine = sep : cross pretty : [sep] vsep DoubleLine = sep : cross' ++ [sep] cross' = case prop of diff --git a/tests/balance/219.test b/tests/balance/219.test index 076cf6eba..5a5a75a0e 100644 --- a/tests/balance/219.test +++ b/tests/balance/219.test @@ -4,9 +4,9 @@ hledger -f balance-multicol.journal bal -MEH --no-total date:2013/1 --tree --fla >>> Ending balances (historical) in 2013/01: - || 2013/01/31 -=================++============= - assets:checking || 10 + || 2013/01/31 +=================++============ + assets:checking || 10 >>>= 0 @@ -15,9 +15,9 @@ hledger -f balance-multicol.journal bal -MEH --no-total date:2013/1 --flat --tre >>> Ending balances (historical) in 2013/01: - || 2013/01/31 -============++============= - assets || 10 - checking || 10 + || 2013/01/31 +============++============ + assets || 10 + checking || 10 >>>= 0 diff --git a/tests/balance/373-layout.test b/tests/balance/373-layout.test index f1baf455f..6b11737e4 100644 --- a/tests/balance/373-layout.test +++ b/tests/balance/373-layout.test @@ -38,14 +38,14 @@ hledger -f 373.journal bal -Y >>> Balance changes in 2015: - || 2015 -===========++======= - 1:2 || -1 - 1:2:3 || 1 - 1:2:3:4 || -1 - 1:2:3:4:5 || 1 ------------++------- - || 0 + || 2015 +===========++====== + 1:2 || -1 + 1:2:3 || 1 + 1:2:3:4 || -1 + 1:2:3:4:5 || 1 +-----------++------ + || 0 >>>=0 @@ -54,11 +54,11 @@ hledger -f 373.journal bal -Y --tree >>> Balance changes in 2015: - || 2015 -===========++======= - 3 || 1 - 5 || 1 ------------++------- - || + || 2015 +===========++====== + 3 || 1 + 5 || 1 +-----------++------ + || >>>=0 diff --git a/tests/balance/depth.test b/tests/balance/depth.test index 3b70d6310..db4047269 100644 --- a/tests/balance/depth.test +++ b/tests/balance/depth.test @@ -18,11 +18,11 @@ hledger -f sample.journal balance -M -e 2008/4 --depth 0 >>> Balance changes in 2008/01: - || 2008/01 -=====++========== - ... || 0 ------++---------- - || 0 + || 2008/01 +=====++========= + ... || 0 +-----++--------- + || 0 >>>=0 diff --git a/tests/balance/intervals.test b/tests/balance/intervals.test index 31cee92ef..656c8ecf3 100644 --- a/tests/balance/intervals.test +++ b/tests/balance/intervals.test @@ -16,11 +16,11 @@ hledger -f balance-multicol.journal balance -p 'monthly in 2013' --no-total >>> Balance changes in 2013q1: - || 2013/01 2013/02 2013/03 -=================++============================ - assets || 0 1 0 - assets:cash || 0 1 0 - assets:checking || 0 0 1 + || 2013/01 2013/02 2013/03 +=================++=========================== + assets || 0 1 0 + assets:cash || 0 1 0 + assets:checking || 0 0 1 >>>=0 @@ -37,11 +37,11 @@ hledger -f - balance -p 'quarterly in 2013' --empty >>> Balance changes in 2013: - || 2013q1 2013q2 2013q3 2013q4 -===++================================= - a || 2 0 0 0 ----++--------------------------------- - || 2 0 0 0 + || 2013q1 2013q2 2013q3 2013q4 +===++================================ + a || 2 0 0 0 +---++-------------------------------- + || 2 0 0 0 >>>=0 @@ -51,13 +51,13 @@ hledger -f balance-multicol.journal balance -p 'monthly in 2013' --cumulative >>> Ending balances (cumulative) in 2013q1: - || 2013/01/31 2013/02/28 2013/03/31 -=================++===================================== - assets || 0 1 1 - assets:cash || 0 1 1 - assets:checking || 0 0 1 ------------------++------------------------------------- - || 0 2 3 + || 2013/01/31 2013/02/28 2013/03/31 +=================++==================================== + assets || 0 1 1 + assets:cash || 0 1 1 + assets:checking || 0 0 1 +-----------------++------------------------------------ + || 0 2 3 >>>=0 @@ -68,12 +68,12 @@ hledger -f balance-multicol.journal balance -p 'monthly in 2013' --cumulative no >>> Ending balances (cumulative) in 2013q1: - || 2013/01/31 2013/02/28 2013/03/31 -=================++===================================== - assets || 0 1 1 - assets:checking || 0 0 1 ------------------++------------------------------------- - || 0 1 2 + || 2013/01/31 2013/02/28 2013/03/31 +=================++==================================== + assets || 0 1 1 + assets:checking || 0 0 1 +-----------------++------------------------------------ + || 0 1 2 >>>=0 @@ -82,13 +82,13 @@ hledger -f balance-multicol.journal balance -p 'monthly in 2013' --historical >>> Ending balances (historical) in 2013q1: - || 2013/01/31 2013/02/28 2013/03/31 -=================++===================================== - assets || 0 1 1 - assets:cash || 0 1 1 - assets:checking || 10 10 11 ------------------++------------------------------------- - || 10 12 13 + || 2013/01/31 2013/02/28 2013/03/31 +=================++==================================== + assets || 0 1 1 + assets:cash || 0 1 1 + assets:checking || 10 10 11 +-----------------++------------------------------------ + || 10 12 13 >>>=0 @@ -98,12 +98,12 @@ hledger -f balance-multicol.journal balance -p 'monthly in 2013' not:assets$ >>> Balance changes in 2013q1: - || 2013/01 2013/02 2013/03 -=================++============================ - assets:cash || 0 1 0 - assets:checking || 0 0 1 ------------------++---------------------------- - || 0 1 1 + || 2013/01 2013/02 2013/03 +=================++=========================== + assets:cash || 0 1 0 + assets:checking || 0 0 1 +-----------------++--------------------------- + || 0 1 1 >>>=0 @@ -112,12 +112,12 @@ hledger -f balance-multicol.journal balance -p 'monthly in 2013' not:assets$ --c >>> Ending balances (cumulative) in 2013q1: - || 2013/01/31 2013/02/28 2013/03/31 -=================++===================================== - assets:cash || 0 1 1 - assets:checking || 0 0 1 ------------------++------------------------------------- - || 0 1 2 + || 2013/01/31 2013/02/28 2013/03/31 +=================++==================================== + assets:cash || 0 1 1 + assets:checking || 0 0 1 +-----------------++------------------------------------ + || 0 1 2 >>>=0 @@ -126,13 +126,13 @@ hledger -f balance-multicol.journal balance -p 'monthly in 2013' --historical >>> Ending balances (historical) in 2013q1: - || 2013/01/31 2013/02/28 2013/03/31 -=================++===================================== - assets || 0 1 1 - assets:cash || 0 1 1 - assets:checking || 10 10 11 ------------------++------------------------------------- - || 10 12 13 + || 2013/01/31 2013/02/28 2013/03/31 +=================++==================================== + assets || 0 1 1 + assets:cash || 0 1 1 + assets:checking || 10 10 11 +-----------------++------------------------------------ + || 10 12 13 >>>=0 @@ -143,11 +143,11 @@ hledger -f balance-multicol.journal balance -p 'monthly in 2013' --depth 1 >>> Balance changes in 2013q1: - || 2013/01 2013/02 2013/03 -========++============================ - assets || 0 2 1 ---------++---------------------------- - || 0 2 1 + || 2013/01 2013/02 2013/03 +========++=========================== + assets || 0 2 1 +--------++--------------------------- + || 0 2 1 >>>=0 @@ -156,11 +156,11 @@ hledger -f balance-multicol.journal balance -p 'monthly in 2013' --depth 1 asset >>> Balance changes in 2013q1: - || 2013/01 2013/02 2013/03 -========++============================ - assets || 0 1 1 ---------++---------------------------- - || 0 1 1 + || 2013/01 2013/02 2013/03 +========++=========================== + assets || 0 1 1 +--------++--------------------------- + || 0 1 1 >>>=0 @@ -169,11 +169,11 @@ hledger -f balance-multicol.journal balance -p 'monthly in 2013' --depth 1 --cum >>> Ending balances (cumulative) in 2013q1: - || 2013/01/31 2013/02/28 2013/03/31 -========++===================================== - assets || 0 2 3 ---------++------------------------------------- - || 0 2 3 + || 2013/01/31 2013/02/28 2013/03/31 +========++==================================== + assets || 0 2 3 +--------++------------------------------------ + || 0 2 3 >>>=0 @@ -182,11 +182,11 @@ hledger -f balance-multicol.journal balance -p 'monthly in 2013' --depth 1 --his >>> Ending balances (historical) in 2013q1: - || 2013/01/31 2013/02/28 2013/03/31 -========++===================================== - assets || 10 12 13 ---------++------------------------------------- - || 10 12 13 + || 2013/01/31 2013/02/28 2013/03/31 +========++==================================== + assets || 10 12 13 +--------++------------------------------------ + || 10 12 13 >>>=0 @@ -195,13 +195,13 @@ hledger -f balance-multicol.journal balance -p 'monthly in 2013' --tree >>> Balance changes in 2013q1: - || 2013/01 2013/02 2013/03 -============++============================ - assets || 0 2 1 - cash || 0 1 0 - checking || 0 0 1 -------------++---------------------------- - || 0 2 1 + || 2013/01 2013/02 2013/03 +============++=========================== + assets || 0 2 1 + cash || 0 1 0 + checking || 0 0 1 +------------++--------------------------- + || 0 2 1 >>>=0 @@ -210,13 +210,13 @@ hledger -f balance-multicol.journal balance -p 'monthly in 2013' --cumulative -- >>> Ending balances (cumulative) in 2013q1: - || 2013/01/31 2013/02/28 2013/03/31 -============++===================================== - assets || 0 2 3 - cash || 0 1 1 - checking || 0 0 1 -------------++------------------------------------- - || 0 2 3 + || 2013/01/31 2013/02/28 2013/03/31 +============++==================================== + assets || 0 2 3 + cash || 0 1 1 + checking || 0 0 1 +------------++------------------------------------ + || 0 2 3 >>>=0 @@ -225,13 +225,13 @@ hledger -f balance-multicol.journal balance -p 'monthly in 2013' --historical -- >>> Ending balances (historical) in 2013q1: - || 2013/01/31 2013/02/28 2013/03/31 -============++===================================== - assets || 10 12 13 - cash || 0 1 1 - checking || 10 10 11 -------------++------------------------------------- - || 10 12 13 + || 2013/01/31 2013/02/28 2013/03/31 +============++==================================== + assets || 10 12 13 + cash || 0 1 1 + checking || 10 10 11 +------------++------------------------------------ + || 10 12 13 >>>=0 @@ -247,12 +247,12 @@ hledger -f- balance --monthly --date2 >>> Balance changes in 2014/01: - || 2014/01 -===++========== - a || 1 - b || 1 ----++---------- - || 2 + || 2014/01 +===++========= + a || 1 + b || 1 +---++--------- + || 2 >>>=0 @@ -271,12 +271,12 @@ hledger -f- balance -p 'monthly 2014/1/10-2014/2/20' >>> Balance changes in 2014/01/01-2014/02/28: - || 2014/01 2014/02 -========++=================== - after || 0 1 - before || 1 0 - within || 0 1 ---------++------------------- - || 1 2 + || 2014/01 2014/02 +========++================== + after || 0 1 + before || 1 0 + within || 0 1 +--------++------------------ + || 1 2 >>>=0 diff --git a/tests/balance/pretty.test b/tests/balance/pretty.test index 480aef94d..fa66da6ad 100644 --- a/tests/balance/pretty.test +++ b/tests/balance/pretty.test @@ -2,12 +2,12 @@ hledger -f balance-multicol.journal balance --pretty-tables -M >>> Balance changes in 2012/12/01-2013/03/31: - ║ 2012/12 2013/01 2013/02 2013/03 -═════════════════╬═════════════════════════════════════ - assets ║ 0 0 1 0 - assets:cash ║ 0 0 1 0 - assets:checking ║ 10 0 0 1 -─────────────────╫───────────────────────────────────── - ║ 10 0 2 1 + ║ 2012/12 2013/01 2013/02 2013/03 +═════════════════╬════════════════════════════════════ + assets ║ 0 0 1 0 + assets:cash ║ 0 0 1 0 + assets:checking ║ 10 0 0 1 +─────────────────╫──────────────────────────────────── + ║ 10 0 2 1 >>>=0 diff --git a/tests/balancesheet/balancesheet.test b/tests/balancesheet/balancesheet.test index e2fb8cc75..f3a44ff45 100644 --- a/tests/balancesheet/balancesheet.test +++ b/tests/balancesheet/balancesheet.test @@ -28,23 +28,23 @@ hledger -f sample.journal balancesheet -p 'monthly in 2008' >>> Balance Sheet - || 2008/01/31 2008/02/29 2008/03/31 2008/04/30 2008/05/31 2008/06/30 2008/07/31 2008/08/31 2008/09/30 2008/10/31 2008/11/30 2008/12/31 -======================++================================================================================================================================================= - Assets || -----------------------++------------------------------------------------------------------------------------------------------------------------------------------------- - assets:bank:checking || $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 0 - assets:bank:saving || 0 0 0 0 0 $1 $1 $1 $1 $1 $1 $1 - assets:cash || 0 0 0 0 0 $-2 $-2 $-2 $-2 $-2 $-2 $-2 -----------------------++------------------------------------------------------------------------------------------------------------------------------------------------- - || $1 $1 $1 $1 $1 0 0 0 0 0 0 $-1 -======================++================================================================================================================================================= - Liabilities || -----------------------++------------------------------------------------------------------------------------------------------------------------------------------------- - liabilities:debts || 0 0 0 0 0 0 0 0 0 0 0 $1 -----------------------++------------------------------------------------------------------------------------------------------------------------------------------------- - || 0 0 0 0 0 0 0 0 0 0 0 $1 -======================++================================================================================================================================================= - Total || $1 $1 $1 $1 $1 0 0 0 0 0 0 0 + || 2008/01/31 2008/02/29 2008/03/31 2008/04/30 2008/05/31 2008/06/30 2008/07/31 2008/08/31 2008/09/30 2008/10/31 2008/11/30 2008/12/31 +======================++================================================================================================================================================ + Assets || +----------------------++------------------------------------------------------------------------------------------------------------------------------------------------ + assets:bank:checking || $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 0 + assets:bank:saving || 0 0 0 0 0 $1 $1 $1 $1 $1 $1 $1 + assets:cash || 0 0 0 0 0 $-2 $-2 $-2 $-2 $-2 $-2 $-2 +----------------------++------------------------------------------------------------------------------------------------------------------------------------------------ + || $1 $1 $1 $1 $1 0 0 0 0 0 0 $-1 +======================++================================================================================================================================================ + Liabilities || +----------------------++------------------------------------------------------------------------------------------------------------------------------------------------ + liabilities:debts || 0 0 0 0 0 0 0 0 0 0 0 $1 +----------------------++------------------------------------------------------------------------------------------------------------------------------------------------ + || 0 0 0 0 0 0 0 0 0 0 0 $1 +======================++================================================================================================================================================ + Total || $1 $1 $1 $1 $1 0 0 0 0 0 0 0 >>>=0 @@ -53,26 +53,26 @@ hledger -f sample.journal balancesheet -p 'monthly in 2008' --tree >>> Balance Sheet - || 2008/01/31 2008/02/29 2008/03/31 2008/04/30 2008/05/31 2008/06/30 2008/07/31 2008/08/31 2008/09/30 2008/10/31 2008/11/30 2008/12/31 -==============++================================================================================================================================================= - Assets || ---------------++------------------------------------------------------------------------------------------------------------------------------------------------- - assets || $1 $1 $1 $1 $1 0 0 0 0 0 0 $-1 - bank || $1 $1 $1 $1 $1 $2 $2 $2 $2 $2 $2 $1 - checking || $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 0 - saving || 0 0 0 0 0 $1 $1 $1 $1 $1 $1 $1 - cash || 0 0 0 0 0 $-2 $-2 $-2 $-2 $-2 $-2 $-2 ---------------++------------------------------------------------------------------------------------------------------------------------------------------------- - || $1 $1 $1 $1 $1 0 0 0 0 0 0 $-1 -==============++================================================================================================================================================= - Liabilities || ---------------++------------------------------------------------------------------------------------------------------------------------------------------------- - liabilities || 0 0 0 0 0 0 0 0 0 0 0 $1 - debts || 0 0 0 0 0 0 0 0 0 0 0 $1 ---------------++------------------------------------------------------------------------------------------------------------------------------------------------- - || 0 0 0 0 0 0 0 0 0 0 0 $1 -==============++================================================================================================================================================= - Total || $1 $1 $1 $1 $1 0 0 0 0 0 0 0 + || 2008/01/31 2008/02/29 2008/03/31 2008/04/30 2008/05/31 2008/06/30 2008/07/31 2008/08/31 2008/09/30 2008/10/31 2008/11/30 2008/12/31 +==============++================================================================================================================================================ + Assets || +--------------++------------------------------------------------------------------------------------------------------------------------------------------------ + assets || $1 $1 $1 $1 $1 0 0 0 0 0 0 $-1 + bank || $1 $1 $1 $1 $1 $2 $2 $2 $2 $2 $2 $1 + checking || $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 0 + saving || 0 0 0 0 0 $1 $1 $1 $1 $1 $1 $1 + cash || 0 0 0 0 0 $-2 $-2 $-2 $-2 $-2 $-2 $-2 +--------------++------------------------------------------------------------------------------------------------------------------------------------------------ + || $1 $1 $1 $1 $1 0 0 0 0 0 0 $-1 +==============++================================================================================================================================================ + Liabilities || +--------------++------------------------------------------------------------------------------------------------------------------------------------------------ + liabilities || 0 0 0 0 0 0 0 0 0 0 0 $1 + debts || 0 0 0 0 0 0 0 0 0 0 0 $1 +--------------++------------------------------------------------------------------------------------------------------------------------------------------------ + || 0 0 0 0 0 0 0 0 0 0 0 $1 +==============++================================================================================================================================================ + Total || $1 $1 $1 $1 $1 0 0 0 0 0 0 0 >>>= 0 @@ -81,23 +81,23 @@ hledger -f sample.journal balancesheet -p 'monthly in 2008' -A >>> Balance Sheet - || 2008/01/31 2008/02/29 2008/03/31 2008/04/30 2008/05/31 2008/06/30 2008/07/31 2008/08/31 2008/09/30 2008/10/31 2008/11/30 2008/12/31 Average -======================++========================================================================================================================================================== - Assets || -----------------------++---------------------------------------------------------------------------------------------------------------------------------------------------------- - assets:bank:checking || $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 0 $1 - assets:bank:saving || 0 0 0 0 0 $1 $1 $1 $1 $1 $1 $1 $1 - assets:cash || 0 0 0 0 0 $-2 $-2 $-2 $-2 $-2 $-2 $-2 $-1 -----------------------++---------------------------------------------------------------------------------------------------------------------------------------------------------- - || $1 $1 $1 $1 $1 0 0 0 0 0 0 $-1 0 -======================++========================================================================================================================================================== - Liabilities || -----------------------++---------------------------------------------------------------------------------------------------------------------------------------------------------- - liabilities:debts || 0 0 0 0 0 0 0 0 0 0 0 $1 0 -----------------------++---------------------------------------------------------------------------------------------------------------------------------------------------------- - || 0 0 0 0 0 0 0 0 0 0 0 $1 0 -======================++========================================================================================================================================================== - Total || $1 $1 $1 $1 $1 0 0 0 0 0 0 0 0 + || 2008/01/31 2008/02/29 2008/03/31 2008/04/30 2008/05/31 2008/06/30 2008/07/31 2008/08/31 2008/09/30 2008/10/31 2008/11/30 2008/12/31 Average +======================++========================================================================================================================================================= + Assets || +----------------------++--------------------------------------------------------------------------------------------------------------------------------------------------------- + assets:bank:checking || $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 0 $1 + assets:bank:saving || 0 0 0 0 0 $1 $1 $1 $1 $1 $1 $1 $1 + assets:cash || 0 0 0 0 0 $-2 $-2 $-2 $-2 $-2 $-2 $-2 $-1 +----------------------++--------------------------------------------------------------------------------------------------------------------------------------------------------- + || $1 $1 $1 $1 $1 0 0 0 0 0 0 $-1 0 +======================++========================================================================================================================================================= + Liabilities || +----------------------++--------------------------------------------------------------------------------------------------------------------------------------------------------- + liabilities:debts || 0 0 0 0 0 0 0 0 0 0 0 $1 0 +----------------------++--------------------------------------------------------------------------------------------------------------------------------------------------------- + || 0 0 0 0 0 0 0 0 0 0 0 $1 0 +======================++========================================================================================================================================================= + Total || $1 $1 $1 $1 $1 0 0 0 0 0 0 0 0 >>>= 0 @@ -106,21 +106,21 @@ hledger -f sample.journal balancesheet -p 'monthly in 2008' -NT >>> Balance Sheet - || 2008/01/31 2008/02/29 2008/03/31 2008/04/30 2008/05/31 2008/06/30 2008/07/31 2008/08/31 2008/09/30 2008/10/31 2008/11/30 2008/12/31 Total -======================++========================================================================================================================================================== - Assets || -----------------------++---------------------------------------------------------------------------------------------------------------------------------------------------------- - assets:bank:checking || $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 0 $11 - assets:bank:saving || 0 0 0 0 0 $1 $1 $1 $1 $1 $1 $1 $7 - assets:cash || 0 0 0 0 0 $-2 $-2 $-2 $-2 $-2 $-2 $-2 $-14 -----------------------++---------------------------------------------------------------------------------------------------------------------------------------------------------- - || $1 $1 $1 $1 $1 0 0 0 0 0 0 $-1 $4 -======================++========================================================================================================================================================== - Liabilities || -----------------------++---------------------------------------------------------------------------------------------------------------------------------------------------------- - liabilities:debts || 0 0 0 0 0 0 0 0 0 0 0 $1 $1 -----------------------++---------------------------------------------------------------------------------------------------------------------------------------------------------- - || 0 0 0 0 0 0 0 0 0 0 0 $1 $1 + || 2008/01/31 2008/02/29 2008/03/31 2008/04/30 2008/05/31 2008/06/30 2008/07/31 2008/08/31 2008/09/30 2008/10/31 2008/11/30 2008/12/31 Total +======================++========================================================================================================================================================= + Assets || +----------------------++--------------------------------------------------------------------------------------------------------------------------------------------------------- + assets:bank:checking || $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 0 $11 + assets:bank:saving || 0 0 0 0 0 $1 $1 $1 $1 $1 $1 $1 $7 + assets:cash || 0 0 0 0 0 $-2 $-2 $-2 $-2 $-2 $-2 $-2 $-14 +----------------------++--------------------------------------------------------------------------------------------------------------------------------------------------------- + || $1 $1 $1 $1 $1 0 0 0 0 0 0 $-1 $4 +======================++========================================================================================================================================================= + Liabilities || +----------------------++--------------------------------------------------------------------------------------------------------------------------------------------------------- + liabilities:debts || 0 0 0 0 0 0 0 0 0 0 0 $1 $1 +----------------------++--------------------------------------------------------------------------------------------------------------------------------------------------------- + || 0 0 0 0 0 0 0 0 0 0 0 $1 $1 >>>= 0 @@ -181,20 +181,20 @@ hledger -f- balancesheet -YTA >>> Balance Sheet - || 2017/12/31 Total Average -=============++=============================== - Assets || --------------++------------------------------- - assets || $1 $1 $1 --------------++------------------------------- - || $1 $1 $1 -=============++=============================== - Liabilities || --------------++------------------------------- --------------++------------------------------- - || -=============++=============================== - Total || $1 $1 $1 + || 2017/12/31 Total Average +=============++============================== + Assets || +-------------++------------------------------ + assets || $1 $1 $1 +-------------++------------------------------ + || $1 $1 $1 +=============++============================== + Liabilities || +-------------++------------------------------ +-------------++------------------------------ + || +=============++============================== + Total || $1 $1 $1 >>>2 >>>=0 @@ -208,20 +208,20 @@ hledger -f - balancesheet -M --pretty-tables >>> Balance Sheet - ║ 2016/01/31 -═════════════╬═════════════ - Assets ║ -─────────────╫───────────── - assets ║ 1 -─────────────╫───────────── - ║ 1 -═════════════╬═════════════ - Liabilities ║ -─────────────╫───────────── -─────────────╫───────────── - ║ -═════════════╬═════════════ - Total ║ 1 + ║ 2016/01/31 +═════════════╬════════════ + Assets ║ +─────────────╫──────────── + assets ║ 1 +─────────────╫──────────── + ║ 1 +═════════════╬════════════ + Liabilities ║ +─────────────╫──────────── +─────────────╫──────────── + ║ +═════════════╬════════════ + Total ║ 1 >>>2 >>>= 0 diff --git a/tests/cashflow/cashflow.test b/tests/cashflow/cashflow.test index 64952f7f5..0b5fffa1d 100644 --- a/tests/cashflow/cashflow.test +++ b/tests/cashflow/cashflow.test @@ -151,15 +151,15 @@ hledger -f sample.journal cashflow -p 'monthly in 2008' >>> Cashflow Statement - || 2008/01 2008/02 2008/03 2008/04 2008/05 2008/06 2008/07 2008/08 2008/09 2008/10 2008/11 2008/12 -======================++============================================================================================================= - Cash flows || -----------------------++------------------------------------------------------------------------------------------------------------- - assets:bank:checking || $1 0 0 0 0 0 0 0 0 0 0 $-1 - assets:bank:saving || 0 0 0 0 0 $1 0 0 0 0 0 0 - assets:cash || 0 0 0 0 0 $-2 0 0 0 0 0 0 -----------------------++------------------------------------------------------------------------------------------------------------- - || $1 0 0 0 0 $-1 0 0 0 0 0 $-1 + || 2008/01 2008/02 2008/03 2008/04 2008/05 2008/06 2008/07 2008/08 2008/09 2008/10 2008/11 2008/12 +======================++============================================================================================================ + Cash flows || +----------------------++------------------------------------------------------------------------------------------------------------ + assets:bank:checking || $1 0 0 0 0 0 0 0 0 0 0 $-1 + assets:bank:saving || 0 0 0 0 0 $1 0 0 0 0 0 0 + assets:cash || 0 0 0 0 0 $-2 0 0 0 0 0 0 +----------------------++------------------------------------------------------------------------------------------------------------ + || $1 0 0 0 0 $-1 0 0 0 0 0 $-1 >>>= 0 @@ -168,15 +168,15 @@ hledger -f sample.journal cashflow -p 'monthly in 2008' -A --historical >>> Cashflow Statement (Historical Ending Balances) - || 2008/01/31 2008/02/29 2008/03/31 2008/04/30 2008/05/31 2008/06/30 2008/07/31 2008/08/31 2008/09/30 2008/10/31 2008/11/30 2008/12/31 Average -======================++========================================================================================================================================================== - Cash flows || -----------------------++---------------------------------------------------------------------------------------------------------------------------------------------------------- - assets:bank:checking || $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 0 $1 - assets:bank:saving || 0 0 0 0 0 $1 $1 $1 $1 $1 $1 $1 $1 - assets:cash || 0 0 0 0 0 $-2 $-2 $-2 $-2 $-2 $-2 $-2 $-1 -----------------------++---------------------------------------------------------------------------------------------------------------------------------------------------------- - || $1 $1 $1 $1 $1 0 0 0 0 0 0 $-1 0 + || 2008/01/31 2008/02/29 2008/03/31 2008/04/30 2008/05/31 2008/06/30 2008/07/31 2008/08/31 2008/09/30 2008/10/31 2008/11/30 2008/12/31 Average +======================++========================================================================================================================================================= + Cash flows || +----------------------++--------------------------------------------------------------------------------------------------------------------------------------------------------- + assets:bank:checking || $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 $1 0 $1 + assets:bank:saving || 0 0 0 0 0 $1 $1 $1 $1 $1 $1 $1 $1 + assets:cash || 0 0 0 0 0 $-2 $-2 $-2 $-2 $-2 $-2 $-2 $-1 +----------------------++--------------------------------------------------------------------------------------------------------------------------------------------------------- + || $1 $1 $1 $1 $1 0 0 0 0 0 0 $-1 0 >>>= 0 @@ -213,14 +213,14 @@ hledger -f sample.journal cf -Y >>> Cashflow Statement - || 2008 -====================++======= - Cash flows || ---------------------++------- - assets:bank:saving || $1 - assets:cash || $-2 ---------------------++------- - || $-1 + || 2008 +====================++====== + Cash flows || +--------------------++------ + assets:bank:saving || $1 + assets:cash || $-2 +--------------------++------ + || $-1 >>>2 >>>= 0 @@ -230,12 +230,12 @@ hledger -f sample.journal cf -Y -N >>> Cashflow Statement - || 2008 -====================++======= - Cash flows || ---------------------++------- - assets:bank:saving || $1 - assets:cash || $-2 + || 2008 +====================++====== + Cash flows || +--------------------++------ + assets:bank:saving || $1 + assets:cash || $-2 >>>2 >>>= 0 diff --git a/tests/i18n/wide-char-layout.test b/tests/i18n/wide-char-layout.test index 109afa2c2..90fe0ef82 100644 --- a/tests/i18n/wide-char-layout.test +++ b/tests/i18n/wide-char-layout.test @@ -63,14 +63,14 @@ hledger -f chinese.journal balance -Y >>> Balance changes in 2014: - || 2014 -================++======= - 㐀:㐁 || -1 - 㐀:㐁:㐂 || 1 - 㐀:㐁:㐂:㐃 || -1 - 㐀:㐁:㐂:㐃:㐄 || 1 -----------------++------- - || 0 + || 2014 +================++====== + 㐀:㐁 || -1 + 㐀:㐁:㐂 || 1 + 㐀:㐁:㐂:㐃 || -1 + 㐀:㐁:㐂:㐃:㐄 || 1 +----------------++------ + || 0 >>>2 >>>=0 diff --git a/tests/incomestatement/incomestatement.test b/tests/incomestatement/incomestatement.test index aec67288e..33cab9bd7 100644 --- a/tests/incomestatement/incomestatement.test +++ b/tests/incomestatement/incomestatement.test @@ -195,23 +195,23 @@ hledger -f sample.journal incomestatement -p 'monthly in 2008' -AT >>> Income Statement - || 2008/01 2008/02 2008/03 2008/04 2008/05 2008/06 2008/07 2008/08 2008/09 2008/10 2008/11 2008/12 Total Average -===================++=============================================================================================================================== - Revenues || --------------------++------------------------------------------------------------------------------------------------------------------------------- - income:gifts || 0 0 0 0 0 $-1 0 0 0 0 0 0 $-1 0 - income:salary || $-1 0 0 0 0 0 0 0 0 0 0 0 $-1 0 --------------------++------------------------------------------------------------------------------------------------------------------------------- - || $-1 0 0 0 0 $-1 0 0 0 0 0 0 $-2 0 -===================++=============================================================================================================================== - Expenses || --------------------++------------------------------------------------------------------------------------------------------------------------------- - expenses:food || 0 0 0 0 0 $1 0 0 0 0 0 0 $1 0 - expenses:supplies || 0 0 0 0 0 $1 0 0 0 0 0 0 $1 0 --------------------++------------------------------------------------------------------------------------------------------------------------------- - || 0 0 0 0 0 $2 0 0 0 0 0 0 $2 0 -===================++=============================================================================================================================== - Total || $-1 0 0 0 0 $1 0 0 0 0 0 0 0 0 + || 2008/01 2008/02 2008/03 2008/04 2008/05 2008/06 2008/07 2008/08 2008/09 2008/10 2008/11 2008/12 Total Average +===================++============================================================================================================================== + Revenues || +-------------------++------------------------------------------------------------------------------------------------------------------------------ + income:gifts || 0 0 0 0 0 $-1 0 0 0 0 0 0 $-1 0 + income:salary || $-1 0 0 0 0 0 0 0 0 0 0 0 $-1 0 +-------------------++------------------------------------------------------------------------------------------------------------------------------ + || $-1 0 0 0 0 $-1 0 0 0 0 0 0 $-2 0 +===================++============================================================================================================================== + Expenses || +-------------------++------------------------------------------------------------------------------------------------------------------------------ + expenses:food || 0 0 0 0 0 $1 0 0 0 0 0 0 $1 0 + expenses:supplies || 0 0 0 0 0 $1 0 0 0 0 0 0 $1 0 +-------------------++------------------------------------------------------------------------------------------------------------------------------ + || 0 0 0 0 0 $2 0 0 0 0 0 0 $2 0 +===================++============================================================================================================================== + Total || $-1 0 0 0 0 $1 0 0 0 0 0 0 0 0 >>>= 0 @@ -220,22 +220,22 @@ hledger -f sample.journal incomestatement -p 'monthly in 2008' --historical >>> Income Statement (Historical Ending Balances) - || 2008/01/31 2008/02/29 2008/03/31 2008/04/30 2008/05/31 2008/06/30 2008/07/31 2008/08/31 2008/09/30 2008/10/31 2008/11/30 2008/12/31 -===================++================================================================================================================================================= - Revenues || --------------------++------------------------------------------------------------------------------------------------------------------------------------------------- - income:gifts || 0 0 0 0 0 $-1 $-1 $-1 $-1 $-1 $-1 $-1 - income:salary || $-1 $-1 $-1 $-1 $-1 $-1 $-1 $-1 $-1 $-1 $-1 $-1 --------------------++------------------------------------------------------------------------------------------------------------------------------------------------- - || $-1 $-1 $-1 $-1 $-1 $-2 $-2 $-2 $-2 $-2 $-2 $-2 -===================++================================================================================================================================================= - Expenses || --------------------++------------------------------------------------------------------------------------------------------------------------------------------------- - expenses:food || 0 0 0 0 0 $1 $1 $1 $1 $1 $1 $1 - expenses:supplies || 0 0 0 0 0 $1 $1 $1 $1 $1 $1 $1 --------------------++------------------------------------------------------------------------------------------------------------------------------------------------- - || 0 0 0 0 0 $2 $2 $2 $2 $2 $2 $2 -===================++================================================================================================================================================= - Total || $-1 $-1 $-1 $-1 $-1 0 0 0 0 0 0 0 + || 2008/01/31 2008/02/29 2008/03/31 2008/04/30 2008/05/31 2008/06/30 2008/07/31 2008/08/31 2008/09/30 2008/10/31 2008/11/30 2008/12/31 +===================++================================================================================================================================================ + Revenues || +-------------------++------------------------------------------------------------------------------------------------------------------------------------------------ + income:gifts || 0 0 0 0 0 $-1 $-1 $-1 $-1 $-1 $-1 $-1 + income:salary || $-1 $-1 $-1 $-1 $-1 $-1 $-1 $-1 $-1 $-1 $-1 $-1 +-------------------++------------------------------------------------------------------------------------------------------------------------------------------------ + || $-1 $-1 $-1 $-1 $-1 $-2 $-2 $-2 $-2 $-2 $-2 $-2 +===================++================================================================================================================================================ + Expenses || +-------------------++------------------------------------------------------------------------------------------------------------------------------------------------ + expenses:food || 0 0 0 0 0 $1 $1 $1 $1 $1 $1 $1 + expenses:supplies || 0 0 0 0 0 $1 $1 $1 $1 $1 $1 $1 +-------------------++------------------------------------------------------------------------------------------------------------------------------------------------ + || 0 0 0 0 0 $2 $2 $2 $2 $2 $2 $2 +===================++================================================================================================================================================ + Total || $-1 $-1 $-1 $-1 $-1 0 0 0 0 0 0 0 >>>= 0