register: fix -w related test breakage, another width tweak (#102)

As part of adding -w in december I cleaned up/adjusted register field
widths, and didn't make all the tests pass. This commit makes one more
width adjustment
(one space after the date instead of two) and fixes all tests depending on register output.
This commit is contained in:
Simon Michael 2013-04-12 14:56:41 -07:00
parent f40a2b8d9d
commit 2bb120d6c6
12 changed files with 45 additions and 45 deletions

View File

@ -45,7 +45,7 @@ tests_postingsReportAsText = [
-- | Render one register report line item as plain text. Layout is like so:
-- @
-- <----------------------------- width (default: 80) ----------------------------->
-- <----------------------------- width (default: 80) ---------------------------->
-- date (10) description (50%) account (50%) amount (12) balance (12)
-- DDDDDDDDDD dddddddddddddddddddd aaaaaaaaaaaaaaaaaaa AAAAAAAAAAAA AAAAAAAAAAAA
--
@ -63,7 +63,7 @@ postingsReportItemAsText opts (mdate, mdesc, p, b) =
datewidth = 10
amtwidth = 12
balwidth = 12
remaining = totalwidth - (datewidth + 2 + 2 + amtwidth + 2 + balwidth)
remaining = totalwidth - (datewidth + 1 + 2 + amtwidth + 2 + balwidth)
(descwidth, acctwidth) | even r = (r', r')
| otherwise = (r', r'+1)
where r = remaining - 2

View File

@ -7,6 +7,6 @@ hledgerdev -f - register desc:аура
bank 20
cash
>>>
2009/01/01 аура (cyrillic let.. bank 10 10
2009/01/01 аура (cyrillic le.. bank 10 10
cash -10 0
>>>=0