mirror of
https://github.com/simonmichael/hledger.git
synced 2025-01-05 18:13:12 +03:00
b499ea85eb
Avoid concatTopPadded when rendering register output, making that command faster when there's a lot of output.
115 lines
2.8 KiB
Plaintext
115 lines
2.8 KiB
Plaintext
# amount layout tests, using default vertical layout
|
|
# 1. print
|
|
hledgerdev -f - print
|
|
<<<
|
|
2010/1/1
|
|
a EUR 1 ; a euro
|
|
b USD 1 ; a dollar
|
|
c ; a euro and a dollar
|
|
>>>
|
|
2010/01/01
|
|
a EUR 1 ; a euro
|
|
b USD 1 ; a dollar
|
|
EUR -1
|
|
c USD -1 ; a euro and a dollar
|
|
|
|
>>>=0
|
|
|
|
# 2. register
|
|
hledgerdev -f - register
|
|
<<<
|
|
2010/1/1
|
|
a EUR 1 ; a euro
|
|
b USD 1 ; a dollar
|
|
c ; a euro and a dollar
|
|
>>>
|
|
2010/01/01 a EUR 1 EUR 1
|
|
b USD 1 EUR 1
|
|
USD 1
|
|
c EUR -1
|
|
USD -1 0
|
|
>>>=0
|
|
|
|
# 3. balance
|
|
hledgerdev -f - balance
|
|
<<<
|
|
2010/1/1
|
|
a EUR 1 ; a euro
|
|
b USD 1 ; a dollar
|
|
c ; a euro and a dollar
|
|
>>>
|
|
EUR 1 a
|
|
USD 1 b
|
|
EUR -1
|
|
USD -1 c
|
|
--------------------
|
|
0
|
|
>>>=0
|
|
|
|
# 4. a zero amount is always displayed as just "0", regardless of any commodity/decimal places/price (like ledger)
|
|
#
|
|
hledgerdev -f- print --empty
|
|
<<<
|
|
2010/3/1 x
|
|
a $0.00 @ 3EUR
|
|
b
|
|
>>>
|
|
2010/03/01 x
|
|
a 0
|
|
b 0
|
|
|
|
>>>=0
|
|
|
|
# 5. mixed amounts with prices
|
|
# XXX
|
|
# hledgerdev -f - print
|
|
# <<<
|
|
# 2010/1/1
|
|
# a EUR 1 @ USD 1.1 ; a euro
|
|
# b USD 1 ; a dollar
|
|
# c ; a euro and a dollar
|
|
# >>>
|
|
# 2010/01/01
|
|
# a EUR 1 @ USD 1.1 ; a euro
|
|
# b USD 1 ; a dollar
|
|
# EUR -1 @ USD 1.1
|
|
# c USD -1 ; a euro and a dollar
|
|
#
|
|
##
|
|
# 2010/01/01
|
|
# a EUR 1 @ USD 1.1 ; a euro
|
|
# b USD 1.0 ; a dollar
|
|
# c USD -2.1 ; a euro and a dollar
|
|
#
|
|
#>>>=0
|
|
#
|
|
# #
|
|
# hledgerdev -f - register
|
|
# <<<
|
|
# 2010/1/1
|
|
# a EUR 1 @ USD 1.1 ; a euro
|
|
# b USD 1 ; a dollar
|
|
# c ; a euro and a dollar
|
|
# >>>
|
|
# 2010/01/01 a EUR 1 EUR 1
|
|
# EUR 1
|
|
# b USD 1.0 USD 1.0
|
|
# EUR 1
|
|
# c USD -2.1 USD -1.1
|
|
#>>>=0
|
|
#
|
|
# #
|
|
# hledgerdev -f - balance
|
|
# <<<
|
|
# 2010/1/1
|
|
# a EUR 1 @ USD 1.1 ; a euro
|
|
# b USD 1 ; a dollar
|
|
# c ; a euro and a dollar
|
|
# >>>
|
|
# EUR 1 a
|
|
# USD 1.0 b
|
|
# USD -2.1 c
|
|
# --------------------
|
|
# EUR 1
|
|
# USD -1.1
|