mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-08 15:14:49 +03:00
2bb120d6c6
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.
101 lines
2.5 KiB
Plaintext
101 lines
2.5 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
|
|
EUR 1
|
|
b USD 1 USD 1
|
|
EUR -1
|
|
c 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. 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
|