;dev: convert ledger compat tests to individual shell tests

Also comment ledger's tests more robustly,
and log as an org outline.
This commit is contained in:
Simon Michael 2022-12-18 11:45:51 -10:00
parent 7195cebbb0
commit 15646ab999
403 changed files with 19145 additions and 18911 deletions

View File

@ -14,27 +14,28 @@
Assets:♚ 3.00 GBP
Assets:Testing123ÕßDone
comment
test accounts
Assets:AAA
Assets:Bank
Assets:Testing123ÕßDone
Assets:XXX
Assets:♚
Equity:Opening balance
end test
test accounts assets:a
Assets:AAA
end test
test accounts b
Assets:Bank
Equity:Opening balance
end test
test accounts ß
Assets:Testing123ÕßDone
end test
$ hledger -f- check
#test accounts
#Assets:AAA
#Assets:Bank
#Assets:Testing123ÕßDone
#Assets:XXX
#Assets:♚
#Equity:Opening balance
#end test
#
#test accounts assets:a
#Assets:AAA
#end test
#
#test accounts b
#Assets:Bank
#Equity:Opening balance
#end test
#
#test accounts ß
#Assets:Testing123ÕßDone
#end test
#
#

View File

@ -19,69 +19,70 @@
Assets:A -10.00
Liabilities:A 10.00
comment
test bal
10 Assets
5 B
5 C
-10 Equity:Opening balances
--------------------
0
end test
test bal -n
10 Assets
-10 Equity
--------------------
0
end test
test bal -n -E
10 Assets
-10 Equity
0 Liabilities
--------------------
0
end test
test bal -E
10 Assets
0 A
5 B
5 C
-10 Equity:Opening balances
0 Liabilities:A
--------------------
0
end test
test bal --flat
5 Assets:B
5 Assets:C
-10 Equity:Opening balances
--------------------
0
end test
test bal --flat -E
0 Assets:A
5 Assets:B
5 Assets:C
-10 Equity:Opening balances
0 Liabilities:A
--------------------
0
end test
test bal -E --flat --no-total
0 Assets:A
5 Assets:B
5 Assets:C
-10 Equity:Opening balances
0 Liabilities:A
end test
test bal -n --flat
end test
$ hledger -f- check
#test bal
# 10 Assets
# 5 B
# 5 C
# -10 Equity:Opening balances
#--------------------
# 0
#end test
#
#test bal -n
# 10 Assets
# -10 Equity
#--------------------
# 0
#end test
#
#test bal -n -E
# 10 Assets
# -10 Equity
# 0 Liabilities
#--------------------
# 0
#end test
#
#test bal -E
# 10 Assets
# 0 A
# 5 B
# 5 C
# -10 Equity:Opening balances
# 0 Liabilities:A
#--------------------
# 0
#end test
#
#test bal --flat
# 5 Assets:B
# 5 Assets:C
# -10 Equity:Opening balances
#--------------------
# 0
#end test
#
#test bal --flat -E
# 0 Assets:A
# 5 Assets:B
# 5 Assets:C
# -10 Equity:Opening balances
# 0 Liabilities:A
#--------------------
# 0
#end test
#
#test bal -E --flat --no-total
# 0 Assets:A
# 5 Assets:B
# 5 Assets:C
# -10 Equity:Opening balances
# 0 Liabilities:A
#end test
#
#test bal -n --flat
#end test
#
#

View File

@ -27,41 +27,42 @@
Expenses:Rent 570.00 GBP
Assets:Cash -570.00 GBP
comment
test budget -X GBP -p "in january 2012"
-560.00 GBP -560.00 GBP 0 100% Assets
560.00 GBP 560.00 GBP 0 100% Expenses
10.00 GBP 10.00 GBP 0 100% Phone
550.00 GBP 550.00 GBP 0 100% Rent
------------ ------------ ------------ -----
0 0 0 0
end test
test budget -X GBP -p "in feb 2012"
-550.00 GBP -560.00 GBP 10.00 GBP 98% Assets
550.00 GBP 560.00 GBP -10.00 GBP 98% Expenses
20.00 GBP 10.00 GBP 10.00 GBP 200% Phone
530.00 GBP 550.00 GBP -20.00 GBP 96% Rent
------------ ------------ ------------ -----
0 0 0 0
end test
test budget -X GBP -p "in march 2012"
-585.00 GBP -560.00 GBP -25.00 GBP 104% Assets
585.00 GBP 560.00 GBP 25.00 GBP 104% Expenses
15.00 GBP 10.00 GBP 5.00 GBP 150% Phone
570.00 GBP 550.00 GBP 20.00 GBP 104% Rent
------------ ------------ ------------ -----
0 0 0 0
end test
test budget -X GBP --now "2012-03-31"
-1695.00 GBP -1680.00 GBP -15.00 GBP 101% Assets
1695.00 GBP 1680.00 GBP 15.00 GBP 101% Expenses
45.00 GBP 30.00 GBP 15.00 GBP 150% Phone
1650.00 GBP 1650.00 GBP 0 100% Rent
------------ ------------ ------------ -----
0 0 0 0
end test
$ hledger -f- check
#test budget -X GBP -p "in january 2012"
# -560.00 GBP -560.00 GBP 0 100% Assets
# 560.00 GBP 560.00 GBP 0 100% Expenses
# 10.00 GBP 10.00 GBP 0 100% Phone
# 550.00 GBP 550.00 GBP 0 100% Rent
#------------ ------------ ------------ -----
# 0 0 0 0
#end test
#
#test budget -X GBP -p "in feb 2012"
# -550.00 GBP -560.00 GBP 10.00 GBP 98% Assets
# 550.00 GBP 560.00 GBP -10.00 GBP 98% Expenses
# 20.00 GBP 10.00 GBP 10.00 GBP 200% Phone
# 530.00 GBP 550.00 GBP -20.00 GBP 96% Rent
#------------ ------------ ------------ -----
# 0 0 0 0
#end test
#
#test budget -X GBP -p "in march 2012"
# -585.00 GBP -560.00 GBP -25.00 GBP 104% Assets
# 585.00 GBP 560.00 GBP 25.00 GBP 104% Expenses
# 15.00 GBP 10.00 GBP 5.00 GBP 150% Phone
# 570.00 GBP 550.00 GBP 20.00 GBP 104% Rent
#------------ ------------ ------------ -----
# 0 0 0 0
#end test
#
#test budget -X GBP --now "2012-03-31"
#-1695.00 GBP -1680.00 GBP -15.00 GBP 101% Assets
# 1695.00 GBP 1680.00 GBP 15.00 GBP 101% Expenses
# 45.00 GBP 30.00 GBP 15.00 GBP 150% Phone
# 1650.00 GBP 1650.00 GBP 0 100% Rent
#------------ ------------ ------------ -----
# 0 0 0 0
#end test
#
#

View File

@ -21,18 +21,19 @@
A 40.00
H
comment
test cleared
50 10 12-Feb-23 A
-10 -10 12-Feb-23 B
45 30 12-Feb-26 C
-15 0 D
20 0 E
-20 0 F
-30 -30 12-Feb-26 G
-40 0 H
---------------- ---------------- ---------
0 0
end test
$ hledger -f- check
#test cleared
# 50 10 12-Feb-23 A
# -10 -10 12-Feb-23 B
# 45 30 12-Feb-26 C
# -15 0 D
# 20 0 E
# -20 0 F
# -30 -30 12-Feb-26 G
# -40 0 H
#---------------- ---------------- ---------
# 0 0
#end test
#
#

View File

@ -14,19 +14,20 @@
Assets:Rewards 1000 "M&M"
Income:Rewards
comment
test commodities
"AA2"
"M&M"
AAA
GBP
end test
test commodities Assets:Rewards
"M&M"
end test
test commodities no:such:account
end test
$ hledger -f- check
#test commodities
#"AA2"
#"M&M"
#AAA
#GBP
#end test
#
#test commodities Assets:Rewards
#"M&M"
#end test
#
#test commodities no:such:account
#end test
#
#

View File

@ -1,55 +1,57 @@
comment
test -f /dev/null --input-date-format "%m/%d/%Y" convert test/baseline/cmd-convert1.dat
2011/12/12=2011/12/13 * (100) Test ;test
Expenses:Unknown $10
Equity:Unknown $-10 = $20
$ hledger -f- check
2011/12/12=2011/12/12 *
Expenses:Unknown $10
Equity:Unknown
end test
test -f /dev/null --input-date-format "%m/%d/%Y" convert test/baseline/cmd-convert2.dat
2011/01/01 * test
Expenses:Unknown 20.00 EUR
Equity:Unknown
end test
test -f /dev/null --input-date-format "%m/%d/%Y" convert test/baseline/cmd-convert3.dat -> 1
__ERROR__
While parsing file "$sourcepath/test/baseline/cmd-convert3.dat", line 1:
While parsing CSV line:
01/01/2011,,
Error: Only one posting with null amount allowed per transaction
end test
test -f /dev/null convert test/baseline/cmd-convert4.dat -> 1
__ERROR__
While parsing file "$sourcepath/test/baseline/cmd-convert4.dat", line 1:
While parsing CSV line:
bogus,$10,
Error: Invalid date: bogus
end test
test -f /dev/null --input-date-format "%m/%d/%Y" convert test/baseline/cmd-convert5.dat
2011/01/01 * test1
Expenses:Unknown 20.00 EUR
Equity:Unknown
2011/01/02 * test2
Expenses:Unknown -10.00 EUR
Equity:Unknown
end test
test -f /dev/null --input-date-format "%m/%d/%Y" convert test/baseline/cmd-convert6.dat -> 1
__ERROR__
While parsing file "$sourcepath/test/baseline/cmd-convert6.dat", line 1:
While parsing CSV line:
01/01/2011,20.00 EUR,10.00 EUR,test1,
Error: Cannot have two values for a single transaction
end test
#test -f /dev/null --input-date-format "%m/%d/%Y" convert test/baseline/cmd-convert1.dat
#2011/12/12=2011/12/13 * (100) Test ;test
# Expenses:Unknown $10
# Equity:Unknown $-10 = $20
#
#2011/12/12=2011/12/12 *
# Expenses:Unknown $10
# Equity:Unknown
#end test
#
#test -f /dev/null --input-date-format "%m/%d/%Y" convert test/baseline/cmd-convert2.dat
#2011/01/01 * test
# Expenses:Unknown 20.00 EUR
# Equity:Unknown
#end test
#
#test -f /dev/null --input-date-format "%m/%d/%Y" convert test/baseline/cmd-convert3.dat -> 1
#__ERROR__
#While parsing file "$sourcepath/test/baseline/cmd-convert3.dat", line 1:
#While parsing CSV line:
# 01/01/2011,,
#
#Error: Only one posting with null amount allowed per transaction
#end test
#
#test -f /dev/null convert test/baseline/cmd-convert4.dat -> 1
#__ERROR__
#While parsing file "$sourcepath/test/baseline/cmd-convert4.dat", line 1:
#While parsing CSV line:
# bogus,$10,
#
#Error: Invalid date: bogus
#end test
#
#test -f /dev/null --input-date-format "%m/%d/%Y" convert test/baseline/cmd-convert5.dat
#2011/01/01 * test1
# Expenses:Unknown 20.00 EUR
# Equity:Unknown
#
#2011/01/02 * test2
# Expenses:Unknown -10.00 EUR
# Equity:Unknown
#end test
#
#test -f /dev/null --input-date-format "%m/%d/%Y" convert test/baseline/cmd-convert6.dat -> 1
#__ERROR__
#While parsing file "$sourcepath/test/baseline/cmd-convert6.dat", line 1:
#While parsing CSV line:
# 01/01/2011,20.00 EUR,10.00 EUR,test1,
#
#Error: Cannot have two values for a single transaction
#end test
#

View File

@ -32,24 +32,25 @@
Assets:A -10.00 EUR
Liabilities:A 10.00 EUR
comment
test csv
"2012/01/01","","Opening balances","Assets:A","","10","*",""
"2012/01/01","","Opening balances","Equity:Opening balances","","-10","*",""
"2012/01/02","","Cleared posting","Assets:A","","-10","*",""
"2012/01/02","","Cleared posting","Assets:B","","10","*",""
"2012/01/03","","Uncleared posting","Assets:B","","-5","",""
"2012/01/03","","Uncleared posting","Assets:C","","5","",""
"2012/01/04","","aux date","Assets:A","","10","*",""
"2012/01/04","","aux date","Liabilities:A","","-10","*",""
"2012/01/05","100","Code","Assets:A","","-10","*",""
"2012/01/05","100","Code","Liabilities:A","","10","*",""
"2012/01/06","100","Specify commodity","Assets:A","$","-10","*",""
"2012/01/06","100","Specify commodity","Liabilities:A","$","10","*",""
"2012/01/07","100","Specify commodity","Assets:A","EUR","-10","*",""
"2012/01/07","100","Specify commodity","Liabilities:A","EUR","10","*",""
"2012/01/08","100","With note","Assets:A","EUR","-10","*","This is an xact note"
"2012/01/08","100","With note","Liabilities:A","EUR","10","*","This is an xact note"
end test
$ hledger -f- check
#test csv
#"2012/01/01","","Opening balances","Assets:A","","10","*",""
#"2012/01/01","","Opening balances","Equity:Opening balances","","-10","*",""
#"2012/01/02","","Cleared posting","Assets:A","","-10","*",""
#"2012/01/02","","Cleared posting","Assets:B","","10","*",""
#"2012/01/03","","Uncleared posting","Assets:B","","-5","",""
#"2012/01/03","","Uncleared posting","Assets:C","","5","",""
#"2012/01/04","","aux date","Assets:A","","10","*",""
#"2012/01/04","","aux date","Liabilities:A","","-10","*",""
#"2012/01/05","100","Code","Assets:A","","-10","*",""
#"2012/01/05","100","Code","Liabilities:A","","10","*",""
#"2012/01/06","100","Specify commodity","Assets:A","$","-10","*",""
#"2012/01/06","100","Specify commodity","Liabilities:A","$","10","*",""
#"2012/01/07","100","Specify commodity","Assets:A","EUR","-10","*",""
#"2012/01/07","100","Specify commodity","Liabilities:A","EUR","10","*",""
#"2012/01/08","100","With note","Assets:A","EUR","-10","*","This is an xact note"
#"2012/01/08","100","With note","Liabilities:A","EUR","10","*","This is an xact note"
#end test
#
#

View File

@ -1,14 +1,15 @@
comment
test echo foo
foo
end test
test echo "foo bar"
foo bar
end test
test echo "foo\nbar"
foo\nbar
end test
$ hledger -f- check
#test echo foo
#foo
#end test
#
#test echo "foo bar"
#foo bar
#end test
#
#test echo "foo\nbar"
#foo\nbar
#end test
#
#

View File

@ -11,58 +11,59 @@
E 30.00 GBP
F
comment
test --now 2012/03/25 entry "Test 1"
2012/03/25 Test 1
A $10.00
B
end test
test --now 2012/03/25 entry "Test 2"
2012/03/25 Test 2
C 20.00 EUR
D
end test
; I think this output is wrong, see bug #737
test --now 2012/03/25 entry "Test 3"
2012/03/25 Test 4
E 30.00 GBP
F
end test
test --now 2012/03/25 entry "Test 4"
2012/03/25 Test 4
E 30.00 GBP
F
end test
test entry no:such:account -> 1
__ERROR__
Error: No accounts, and no past transaction matching 'no:such:account'
end test
test entry --now 2012/03/25 thursday "Test 1"
2012/03/22 Test 1
A $10.00
B
end test
test --now 2012/03/25 entry tue at "Test 2"
2012/03/20 Test 2
C 20.00 EUR
D
end test
test --now 2012/03/25 entry "Test 1" from D
2012/03/25 Test 1
A $10.00
D
end test
test --now 2012/03/25 entry "Test 1" from -> 1
__ERROR__
Error: Invalid xact command arguments
end test
$ hledger -f- check
#test --now 2012/03/25 entry "Test 1"
#2012/03/25 Test 1
# A $10.00
# B
#end test
#
#test --now 2012/03/25 entry "Test 2"
#2012/03/25 Test 2
# C 20.00 EUR
# D
#end test
#
#; I think this output is wrong, see bug #737
#test --now 2012/03/25 entry "Test 3"
#2012/03/25 Test 4
# E 30.00 GBP
# F
#end test
#
#test --now 2012/03/25 entry "Test 4"
#2012/03/25 Test 4
# E 30.00 GBP
# F
#end test
#
#test entry no:such:account -> 1
#__ERROR__
#Error: No accounts, and no past transaction matching 'no:such:account'
#end test
#
#test entry --now 2012/03/25 thursday "Test 1"
#2012/03/22 Test 1
# A $10.00
# B
#end test
#
#test --now 2012/03/25 entry tue at "Test 2"
#2012/03/20 Test 2
# C 20.00 EUR
# D
#end test
#
#test --now 2012/03/25 entry "Test 1" from D
#2012/03/25 Test 1
# A $10.00
# D
#end test
#
#test --now 2012/03/25 entry "Test 1" from -> 1
#__ERROR__
#Error: Invalid xact command arguments
#end test
#
#

View File

@ -8,53 +8,54 @@ D 1000.00 GBP
Assets:Broker 2 AAA @ 1.00 GBP
Assets:Bank
comment
test equity
2011/03/05 Opening Balances
Assets:Bank -3.80 GBP
Assets:Broker 4 AAA
Equity:Opening Balances -4 AAA
Equity:Opening Balances 3.80 GBP
end test
test equity assets
2011/03/05 Opening Balances
Assets:Bank -3.80 GBP
Assets:Broker 4 AAA
Equity:Opening Balances -4 AAA
Equity:Opening Balances 3.80 GBP
end test
test equity assets:bank
2011/03/05 Opening Balances
Assets:Bank -3.80 GBP
Equity:Opening Balances
end test
test equity assets:broker
2011/03/05 Opening Balances
Assets:Broker 4 AAA
Equity:Opening Balances
end test
test equity --lot-prices
2011/03/05 Opening Balances
Assets:Bank -3.80 GBP
Assets:Broker 2 AAA {0.90 GBP}
Assets:Broker 2 AAA {1.00 GBP}
Equity:Opening Balances -2 AAA {0.90 GBP}
Equity:Opening Balances -2 AAA {1.00 GBP}
Equity:Opening Balances 3.80 GBP
end test
test equity --lots --date-format %Y/%m/%d
2011/03/05 Opening Balances
Assets:Bank -3.80 GBP
Assets:Broker 2 AAA {0.90 GBP} [2011/03/04]
Assets:Broker 2 AAA {1.00 GBP} [2011/03/05]
Equity:Opening Balances -2 AAA {0.90 GBP} [2011/03/04]
Equity:Opening Balances -2 AAA {1.00 GBP} [2011/03/05]
Equity:Opening Balances 3.80 GBP
end test
$ hledger -f- check
#test equity
#2011/03/05 Opening Balances
# Assets:Bank -3.80 GBP
# Assets:Broker 4 AAA
# Equity:Opening Balances -4 AAA
# Equity:Opening Balances 3.80 GBP
#end test
#
#test equity assets
#2011/03/05 Opening Balances
# Assets:Bank -3.80 GBP
# Assets:Broker 4 AAA
# Equity:Opening Balances -4 AAA
# Equity:Opening Balances 3.80 GBP
#end test
#
#test equity assets:bank
#2011/03/05 Opening Balances
# Assets:Bank -3.80 GBP
# Equity:Opening Balances
#end test
#
#test equity assets:broker
#2011/03/05 Opening Balances
# Assets:Broker 4 AAA
# Equity:Opening Balances
#end test
#
#test equity --lot-prices
#2011/03/05 Opening Balances
# Assets:Bank -3.80 GBP
# Assets:Broker 2 AAA {0.90 GBP}
# Assets:Broker 2 AAA {1.00 GBP}
# Equity:Opening Balances -2 AAA {0.90 GBP}
# Equity:Opening Balances -2 AAA {1.00 GBP}
# Equity:Opening Balances 3.80 GBP
#end test
#
#test equity --lots --date-format %Y/%m/%d
#2011/03/05 Opening Balances
# Assets:Bank -3.80 GBP
# Assets:Broker 2 AAA {0.90 GBP} [2011/03/04]
# Assets:Broker 2 AAA {1.00 GBP} [2011/03/05]
# Equity:Opening Balances -2 AAA {0.90 GBP} [2011/03/04]
# Equity:Opening Balances -2 AAA {1.00 GBP} [2011/03/05]
# Equity:Opening Balances 3.80 GBP
#end test
#
#

View File

@ -23,28 +23,29 @@
E 10
F
comment
test payees
1
3
9
A
B
Z
end test
test payees a
Z
end test
test payees no:such:account
end test
test payees "^B$"
1
9
B
Z
end test
$ hledger -f- check
#test payees
#1
#3
#9
#A
#B
#Z
#end test
#
#test payees a
#Z
#end test
#
#test payees no:such:account
#end test
#
#test payees "^B$"
#1
#9
#B
#Z
#end test
#
#

View File

@ -14,28 +14,29 @@
C 15.80 USD @ 0.63 GBP
D
comment
test pricedb
P 2012/01/02 00:00:00 GBP 1.20 EUR
P 2012/01/03 00:00:00 EUR 1.3166666667 USD
P 2012/01/04 00:00:00 USD 0.63 GBP
end test
test pricedb EUR
P 2012/01/03 00:00:00 EUR 1.3166666667 USD
end test
test pricedb GBP
P 2012/01/02 00:00:00 GBP 1.20 EUR
end test
test pricedb USD
P 2012/01/04 00:00:00 USD 0.63 GBP
end test
test pricedb U
P 2012/01/03 00:00:00 EUR 1.3166666667 USD
P 2012/01/04 00:00:00 USD 0.63 GBP
end test
$ hledger -f- check
#test pricedb
#P 2012/01/02 00:00:00 GBP 1.20 EUR
#P 2012/01/03 00:00:00 EUR 1.3166666667 USD
#P 2012/01/04 00:00:00 USD 0.63 GBP
#end test
#
#test pricedb EUR
#P 2012/01/03 00:00:00 EUR 1.3166666667 USD
#end test
#
#test pricedb GBP
#P 2012/01/02 00:00:00 GBP 1.20 EUR
#end test
#
#test pricedb USD
#P 2012/01/04 00:00:00 USD 0.63 GBP
#end test
#
#test pricedb U
#P 2012/01/03 00:00:00 EUR 1.3166666667 USD
#P 2012/01/04 00:00:00 USD 0.63 GBP
#end test
#
#

View File

@ -15,24 +15,25 @@ P 2012-03-25 AAA $10.00
G 1 AAA @ $10.00
H
comment
test pricemap
graph G {
0[label=""];
1[label="s"];
2[label="%"];
3[label="m"];
4[label="h"];
5[label="GBP"];
6[label="EUR"];
7[label="$"];
8[label="USD"];
9[label="AAA"];
6--5 ;
6--7 ;
8--6 ;
9--7 ;
}
end test
$ hledger -f- check
#test pricemap
#graph G {
#0[label=""];
#1[label="s"];
#2[label="%"];
#3[label="m"];
#4[label="h"];
#5[label="GBP"];
#6[label="EUR"];
#7[label="$"];
#8[label="USD"];
#9[label="AAA"];
#6--5 ;
#6--7 ;
#8--6 ;
#9--7 ;
#}
#end test
#
#

View File

@ -14,28 +14,29 @@
C 15.80 USD @ 0.63 GBP
D
comment
test prices
2012/01/02 GBP 1.20 EUR
2012/01/03 EUR 1.3166666667 USD
2012/01/04 USD 0.63 GBP
end test
test prices EUR
2012/01/03 EUR 1.3166666667 USD
end test
test prices USD
2012/01/04 USD 0.63 GBP
end test
test prices GBP
2012/01/02 GBP 1.20 EUR
end test
test prices U
2012/01/03 EUR 1.3166666667 USD
2012/01/04 USD 0.63 GBP
end test
$ hledger -f- check
#test prices
#2012/01/02 GBP 1.20 EUR
#2012/01/03 EUR 1.3166666667 USD
#2012/01/04 USD 0.63 GBP
#end test
#
#test prices EUR
#2012/01/03 EUR 1.3166666667 USD
#end test
#
#test prices USD
#2012/01/04 USD 0.63 GBP
#end test
#
#test prices GBP
#2012/01/02 GBP 1.20 EUR
#end test
#
#test prices U
#2012/01/03 EUR 1.3166666667 USD
#2012/01/04 USD 0.63 GBP
#end test
#
#

View File

@ -2,10 +2,11 @@
Expenses:Food ($10,00 + $2,50)
Assets:Cash
comment
$ hledger -f- check
test print --decimal-comma
2008/12/31 Market
Expenses:Food ($10,00 + $2,50)
Assets:Cash
end test
#test print --decimal-comma
#2008/12/31 Market
# Expenses:Food ($10,00 + $2,50)
# Assets:Cash
#end test
#

View File

@ -10,33 +10,34 @@
Assets:Investment 1 AAA @ 10.00 GBP
Assets:Cash -10.00 GBP
comment
test reg
12-Jan-10 Phone expense on ho.. Expenses:Phone 12.00 EUR 12.00 EUR
Assets:Cash -10.00 GBP 12.00 EUR
-10.00 GBP
12-Jan-31 Rent expense Expenses:Rent 550.00 GBP 12.00 EUR
540.00 GBP
Assets:Cash -550.00 GBP 12.00 EUR
-10.00 GBP
12-Feb-01 Buy AAA Assets:Investment 1 AAA 1 AAA
12.00 EUR
-10.00 GBP
Assets:Cash -10.00 GBP 1 AAA
12.00 EUR
-20.00 GBP
end test
test r :inve
12-Feb-01 Buy AAA Assets:Investment 1 AAA 1 AAA
end test
test reg :inve
12-Feb-01 Buy AAA Assets:Investment 1 AAA 1 AAA
end test
test register :inve
12-Feb-01 Buy AAA Assets:Investment 1 AAA 1 AAA
end test
$ hledger -f- check
#test reg
#12-Jan-10 Phone expense on ho.. Expenses:Phone 12.00 EUR 12.00 EUR
# Assets:Cash -10.00 GBP 12.00 EUR
# -10.00 GBP
#12-Jan-31 Rent expense Expenses:Rent 550.00 GBP 12.00 EUR
# 540.00 GBP
# Assets:Cash -550.00 GBP 12.00 EUR
# -10.00 GBP
#12-Feb-01 Buy AAA Assets:Investment 1 AAA 1 AAA
# 12.00 EUR
# -10.00 GBP
# Assets:Cash -10.00 GBP 1 AAA
# 12.00 EUR
# -20.00 GBP
#end test
#
#test r :inve
#12-Feb-01 Buy AAA Assets:Investment 1 AAA 1 AAA
#end test
#
#test reg :inve
#12-Feb-01 Buy AAA Assets:Investment 1 AAA 1 AAA
#end test
#
#test register :inve
#12-Feb-01 Buy AAA Assets:Investment 1 AAA 1 AAA
#end test
#
#

View File

@ -1,23 +1,25 @@
comment
test eval 'foo(w, u)=(z=w+u;z*2); (a=1 + 1; foo(10, 15))'
50
end test
$ hledger -f- check
test eval 'foo(x, y, z)=print(x, y, z); bar(x)=x; foo(1, 2, 3); bar(3)'
123
3
end test
test eval 'total_expr=$100;amount_expr=$15;x=total_expr;x=x/5;x=amount_expr-x*5;x'
$-85
end test
test eval 'foo = x, y, z -> print(x, y, z); foo(1, 2, 3)'
123
1
end test
test eval 'foo(x,y)=y(1, 2, 3);foo(amount_expr, (s,d,t -> t))'
3
end test
#test eval 'foo(w, u)=(z=w+u;z*2); (a=1 + 1; foo(10, 15))'
#50
#end test
#
#test eval 'foo(x, y, z)=print(x, y, z); bar(x)=x; foo(1, 2, 3); bar(3)'
#123
#3
#end test
#
#test eval 'total_expr=$100;amount_expr=$15;x=total_expr;x=x/5;x=amount_expr-x*5;x'
#$-85
#end test
#
#test eval 'foo = x, y, z -> print(x, y, z); foo(1, 2, 3)'
#123
#1
#end test
#
#test eval 'foo(x,y)=y(1, 2, 3);foo(amount_expr, (s,d,t -> t))'
#3
#end test
#

View File

@ -15,50 +15,51 @@
E 40.00 GBP
F
comment
test select "date, account, amount" from posts
12-Feb-28 E 20.00 EUR
12-Feb-28 F -20.00 EUR
12-Feb-29 Test 10.01 EUR
12-Feb-29 F -10.01 EUR
12-Mar-24 C 30.00 EUR
12-Mar-24 D -30.00 EUR
12-Mar-25 E 40.00 GBP
12-Mar-25 F -40.00 GBP
end test
test select "date, account, amount from posts where account =~ /^e/"
12-Feb-28 E 20.00 EUR
12-Mar-25 E 40.00 GBP
end test
test select "date, account, amount from posts where account =~ /e/"
12-Feb-28 E 20.00 EUR
12-Feb-29 Test 10.01 EUR
12-Mar-25 E 40.00 GBP
end test
; leave out "from posts" since it is the default
test select "date, account, amount where account =~ /e/"
12-Feb-28 E 20.00 EUR
12-Feb-29 Test 10.01 EUR
12-Mar-25 E 40.00 GBP
end test
test select "date, payee, amount from posts where account =~ /e/ and commodity =~ /GBP/"
12-Mar-25 Test 5 40.00 GBP
end test
test select "date, payee, amount * 2 from posts where account =~ /e/ and commodity =~ /GBP/"
12-Mar-25 Test 5 80.00 GBP
end test
test select "date, code, amount from posts where account =~ /e/ and commodity =~ /GBP/"
12-Mar-25 test 40.00 GBP
end test
test select "date, code * 2, amount from posts where account =~ /e/ and commodity =~ /GBP/"
12-Mar-25 testtest 40.00 GBP
end test
$ hledger -f- check
#test select "date, account, amount" from posts
#12-Feb-28 E 20.00 EUR
#12-Feb-28 F -20.00 EUR
#12-Feb-29 Test 10.01 EUR
#12-Feb-29 F -10.01 EUR
#12-Mar-24 C 30.00 EUR
#12-Mar-24 D -30.00 EUR
#12-Mar-25 E 40.00 GBP
#12-Mar-25 F -40.00 GBP
#end test
#
#test select "date, account, amount from posts where account =~ /^e/"
#12-Feb-28 E 20.00 EUR
#12-Mar-25 E 40.00 GBP
#end test
#
#test select "date, account, amount from posts where account =~ /e/"
#12-Feb-28 E 20.00 EUR
#12-Feb-29 Test 10.01 EUR
#12-Mar-25 E 40.00 GBP
#end test
#
#; leave out "from posts" since it is the default
#test select "date, account, amount where account =~ /e/"
#12-Feb-28 E 20.00 EUR
#12-Feb-29 Test 10.01 EUR
#12-Mar-25 E 40.00 GBP
#end test
#
#test select "date, payee, amount from posts where account =~ /e/ and commodity =~ /GBP/"
#12-Mar-25 Test 5 40.00 GBP
#end test
#
#test select "date, payee, amount * 2 from posts where account =~ /e/ and commodity =~ /GBP/"
#12-Mar-25 Test 5 80.00 GBP
#end test
#
#test select "date, code, amount from posts where account =~ /e/ and commodity =~ /GBP/"
#12-Mar-25 test 40.00 GBP
#end test
#
#test select "date, code * 2, amount from posts where account =~ /e/ and commodity =~ /GBP/"
#12-Mar-25 testtest 40.00 GBP
#end test
#
#

View File

@ -26,41 +26,42 @@
K 100.00 EUR
L -200.00 EUR
comment
test source -> 7
__ERROR__
While parsing file "$FILE", line 1:
While parsing periodic transaction:
> ~ xxx
Error: Unexpected date period token 'xxx'
While parsing file "$FILE", line 6:
Error: Only one posting with null amount allowed per transaction
While parsing file "$FILE", line 11:
Error: Only one posting with null amount allowed per transaction
While parsing file "$FILE", line 13:
While parsing transaction:
> 2012/03/xx
Error: Invalid date: 2012/03/xx
While parsing file "$FILE", line 18:
While parsing posting:
G AAA
^^^
Error: No quantity specified for amount
While parsing file "$FILE", line 22:
While parsing posting:
I 1,00.00 EUR
^^^^^^^^^^^
Error: Incorrect use of thousand-mark comma
While parsing file "$FILE", line 27:
While balancing transaction from "$FILE", lines 25-27:
> 2012-03-27 * Test
> K 100.00 EUR
> L -200.00 EUR
Unbalanced remainder is:
-100.00 EUR
Amount to balance against:
100.00 EUR
Error: Transaction does not balance
end test
$ hledger -f- check
#test source -> 7
#__ERROR__
#While parsing file "$FILE", line 1:
#While parsing periodic transaction:
#> ~ xxx
#Error: Unexpected date period token 'xxx'
#While parsing file "$FILE", line 6:
#Error: Only one posting with null amount allowed per transaction
#While parsing file "$FILE", line 11:
#Error: Only one posting with null amount allowed per transaction
#While parsing file "$FILE", line 13:
#While parsing transaction:
#> 2012/03/xx
#Error: Invalid date: 2012/03/xx
#While parsing file "$FILE", line 18:
#While parsing posting:
# G AAA
# ^^^
#Error: No quantity specified for amount
#While parsing file "$FILE", line 22:
#While parsing posting:
# I 1,00.00 EUR
# ^^^^^^^^^^^
#Error: Incorrect use of thousand-mark comma
#While parsing file "$FILE", line 27:
#While balancing transaction from "$FILE", lines 25-27:
#> 2012-03-27 * Test
#> K 100.00 EUR
#> L -200.00 EUR
#Unbalanced remainder is:
# -100.00 EUR
#Amount to balance against:
# 100.00 EUR
#Error: Transaction does not balance
#end test
#
#

View File

@ -11,23 +11,24 @@
A 30.00 EUR
B
comment
test stats --now "2012-03-31"
Time period: 12-Feb-28 to 12-Mar-24 (25 days)
Files these postings came from:
$sourcepath/test/baseline/cmd-stats.test
Unique payees: 1
Unique accounts: 4
Number of postings: 6 (0.24 per day)
Uncleared postings: 2
Days since last post: 7
Posts in last 7 days: 2
Posts in last 30 days: 2
Posts seen this month: 2
end test
$ hledger -f- check
#test stats --now "2012-03-31"
#Time period: 12-Feb-28 to 12-Mar-24 (25 days)
#
# Files these postings came from:
# $sourcepath/test/baseline/cmd-stats.test
#
# Unique payees: 1
# Unique accounts: 4
#
# Number of postings: 6 (0.24 per day)
# Uncleared postings: 2
#
# Days since last post: 7
# Posts in last 7 days: 2
# Posts in last 30 days: 2
# Posts seen this month: 2
#end test
#
#

View File

@ -28,33 +28,34 @@
A $10
B ; b: bbb
comment
test tags
a
b
bar
foo
xxx
end test
test tags --values
a
a: aaa
b
b: bbb
bar
foo
xxx
end test
test tags --values --count
1 a
2 a: aaa
1 b
1 b: bbb
1 bar
1 foo
2 xxx
end test
$ hledger -f- check
#test tags
#a
#b
#bar
#foo
#xxx
#end test
#
#test tags --values
#a
#a: aaa
#b
#b: bbb
#bar
#foo
#xxx
#end test
#
#test tags --values --count
#1 a
#2 a: aaa
#1 b
#1 b: bbb
#1 bar
#1 foo
#2 xxx
#end test
#
#

View File

@ -11,35 +11,36 @@
E 30.00 GBP
F
comment
test --now 2012/03/25 xact "Test 1"
2012/03/25 Test 1
A $10.00
B
end test
test --now 2012/03/25 xact "Test 2"
2012/03/25 Test 2
C 20.00 EUR
D
end test
; I think this output is wrong, see bug #737
test --now 2012/03/25 xact "Test 3"
2012/03/25 Test 4
E 30.00 GBP
F
end test
test --now 2012/03/25 xact "Test 4"
2012/03/25 Test 4
E 30.00 GBP
F
end test
test xact no:such:account -> 1
__ERROR__
Error: No accounts, and no past transaction matching 'no:such:account'
end test
$ hledger -f- check
#test --now 2012/03/25 xact "Test 1"
#2012/03/25 Test 1
# A $10.00
# B
#end test
#
#test --now 2012/03/25 xact "Test 2"
#2012/03/25 Test 2
# C 20.00 EUR
# D
#end test
#
#; I think this output is wrong, see bug #737
#test --now 2012/03/25 xact "Test 3"
#2012/03/25 Test 4
# E 30.00 GBP
# F
#end test
#
#test --now 2012/03/25 xact "Test 4"
#2012/03/25 Test 4
# E 30.00 GBP
# F
#end test
#
#test xact no:such:account -> 1
#__ERROR__
#Error: No accounts, and no past transaction matching 'no:such:account'
#end test
#
#

View File

@ -27,19 +27,20 @@ account Expenses:Food
food $25.00
Assets:Cash
comment
test reg
12-Feb-27 KFC Expenses:Food $20.00 $20.00
Assets:Cash $-20.00 0
12-Feb-28 KFC Expenses:Food $20.00 $20.00
Assets:Cash $-20.00 0
12-Feb-29 KFC Expenses:Food $25.00 $25.00
Assets:Cash $-25.00 0
12-Feb-29 KFC Expenses:Food $25.00 $25.00
Assets:Cash $-25.00 0
__ERROR__
Warning: "$FILE", line 24: Transaction check failed: (abs(amount) <= {20})
Warning: "$FILE", line 28: Transaction check failed: (abs(amount) <= {20})
end test
$ hledger -f- check
#test reg
#12-Feb-27 KFC Expenses:Food $20.00 $20.00
# Assets:Cash $-20.00 0
#12-Feb-28 KFC Expenses:Food $20.00 $20.00
# Assets:Cash $-20.00 0
#12-Feb-29 KFC Expenses:Food $25.00 $25.00
# Assets:Cash $-25.00 0
#12-Feb-29 KFC Expenses:Food $25.00 $25.00
# Assets:Cash $-25.00 0
#__ERROR__
#Warning: "$FILE", line 24: Transaction check failed: (abs(amount) <= {20})
#Warning: "$FILE", line 28: Transaction check failed: (abs(amount) <= {20})
#end test
#
#

View File

@ -3,10 +3,11 @@ alias Foo=Foo
2011-01-01 Test
Foo 10 EUR
Bar
comment
$ hledger -f- check
test source -> 1
__ERROR__
While parsing file "$FILE", line 1:
Error: Illegal alias Foo=Foo
end test
#test source -> 1
#__ERROR__
#While parsing file "$FILE", line 1:
#Error: Illegal alias Foo=Foo
#end test
#

View File

@ -13,12 +13,13 @@ account Delta
D 20 EUR
Foo
comment
test reg
01-Jan-01 Test B:A 10 EUR 10 EUR
Foo -10 EUR 0
01-Jan-01 Test Delta 20 EUR 20 EUR
Foo -20 EUR 0
end test
$ hledger -f- check
#test reg
#01-Jan-01 Test B:A 10 EUR 10 EUR
# Foo -10 EUR 0
#01-Jan-01 Test Delta 20 EUR 20 EUR
# Foo -20 EUR 0
#end test
#
#

View File

@ -26,11 +26,12 @@ apply account Master Account
include dir-apply.dat
end
comment
$ hledger -f- check
test reg food
12-Mar-12 KFC Master A:Expenses:Food $20 $20
12-Mar-12 KFC Master A:Expenses:Food $20 $40
12-Mar-12 KFC Master A:Expenses:Food $20 $60
12-Mar-12 KFC Master A:Expenses:Food $40 $100
end test
#test reg food
#12-Mar-12 KFC Master A:Expenses:Food $20 $20
#12-Mar-12 KFC Master A:Expenses:Food $20 $40
#12-Mar-12 KFC Master A:Expenses:Food $20 $60
#12-Mar-12 KFC Master A:Expenses:Food $40 $100
#end test
#

View File

@ -9,17 +9,18 @@ commodity $
A 15.00 USD
B
comment
test bal
25.00 $ A
-25.00 $ B
--------------------
0
end test
test reg a
12-Mar-12 $ A 10.00 $ 10.00 $
12-Mar-12 USD A 15.00 $ 25.00 $
end test
$ hledger -f- check
#test bal
# 25.00 $ A
# -25.00 $ B
#--------------------
# 0
#end test
#
#test reg a
#12-Mar-12 $ A 10.00 $ 10.00 $
#12-Mar-12 USD A 15.00 $ 25.00 $
#end test
#
#

View File

@ -17,10 +17,11 @@ commodity USD
Expenses:Food USD 750,00
Assets:Cash
comment
$ hledger -f- check
test reg food -X EUR --now=2012-03-15
12-Mar-06 KFC Expenses:Food 200 EUR 200 EUR
12-Mar-08 KFC Expenses:Food 18750 EUR 18950 EUR
12-Mar-10 KFC Expenses:Food 18750 EUR 37700 EUR
end test
#test reg food -X EUR --now=2012-03-15
#12-Mar-06 KFC Expenses:Food 200 EUR 200 EUR
#12-Mar-08 KFC Expenses:Food 18750 EUR 18950 EUR
#12-Mar-10 KFC Expenses:Food 18750 EUR 37700 EUR
#end test
#

View File

@ -10,14 +10,15 @@ commodity GBP
A 20.00 EUR
B
comment
test bal --pedantic -> 1
__ERROR__
While parsing file "$FILE", line 10:
While parsing posting:
A 20.00 EUR
^^^^^^^^^
Error: Unknown commodity 'EUR'
end test
$ hledger -f- check
#test bal --pedantic -> 1
#__ERROR__
#While parsing file "$FILE", line 10:
#While parsing posting:
# A 20.00 EUR
# ^^^^^^^^^
#Error: Unknown commodity 'EUR'
#end test
#
#

View File

@ -6,9 +6,10 @@ apply fixed XCD $0.374531835206
end apply fixed
comment
$ hledger -f- check
test reg
08-Apr-08 KFC Expenses:Food XCD 43.00 XCD 43.00
Assets:Cash XCD -43.00 0
end test
#test reg
#08-Apr-08 KFC Expenses:Food XCD 43.00 XCD 43.00
# Assets:Cash XCD -43.00 0
#end test
#

View File

@ -13,13 +13,14 @@ tag PATH
Expenses:Food $20
Assets:Cash
comment
$ hledger -f- check
test reg
12-Feb-29 KFC Expenses:Food $20 $20
Assets:Cash $-20 0
12-Feb-29 KFC Expenses:Food $20 $20
Assets:Cash $-20 0
__ERROR__
Warning: "$sourcepath/test/baseline/dir-import_py.test", line 14: Metadata check failed for (PATH: test/baseline/dir-import_noexist.test): ((os.path).isfile(value))
end test
#test reg
#12-Feb-29 KFC Expenses:Food $20 $20
# Assets:Cash $-20 0
#12-Feb-29 KFC Expenses:Food $20 $20
# Assets:Cash $-20 0
#__ERROR__
#Warning: "$sourcepath/test/baseline/dir-import_py.test", line 14: Metadata check failed for (PATH: test/baseline/dir-import_noexist.test): ((os.path).isfile(value))
#end test
#

View File

@ -17,14 +17,15 @@ payee Foo Bar Inc
A 20
B
comment
test reg
12-Mar-25 KFC A 10 10
B -10 0
12-Mar-26 KFC A 10 10
B -10 0
14-May-13 Foo Bar Inc A 20 20
B -20 0
end test
$ hledger -f- check
#test reg
#12-Mar-25 KFC A 10 10
# B -10 0
#12-Mar-26 KFC A 10 10
# B -10 0
#14-May-13 Foo Bar Inc A 20 20
# B -20 0
#end test
#
#

View File

@ -17,14 +17,15 @@ tag PATH
Expenses:Food $20
Assets:Cash
comment
$ hledger -f- check
test reg
12-Feb-29 KFC Expenses:Food $20 $20
Assets:Cash $-20 0
12-Feb-29 KFC Expenses:Food $20 $20
Assets:Cash $-20 0
__ERROR__
Warning: "$sourcepath/test/baseline/dir-python_py.test", line 18: Metadata check failed for (PATH: test/baseline/feat-import_noexist.test): check_path(value)
Warning: "$sourcepath/test/baseline/dir-python_py.test", line 18: Metadata check failed for (PATH: test/baseline/feat-import_noexist.test): ((os.path).isfile(value))
end test
#test reg
#12-Feb-29 KFC Expenses:Food $20 $20
# Assets:Cash $-20 0
#12-Feb-29 KFC Expenses:Food $20 $20
# Assets:Cash $-20 0
#__ERROR__
#Warning: "$sourcepath/test/baseline/dir-python_py.test", line 18: Metadata check failed for (PATH: test/baseline/feat-import_noexist.test): check_path(value)
#Warning: "$sourcepath/test/baseline/dir-python_py.test", line 18: Metadata check failed for (PATH: test/baseline/feat-import_noexist.test): ((os.path).isfile(value))
#end test
#

View File

@ -11,13 +11,14 @@ tag Happy
food $20.00
Assets:Cash
comment
$ hledger -f- check
test reg
12-Feb-27 KFC Expenses:Unknown $20.00 $20.00
Assets:Cash $-20.00 0
12-Feb-28 KFC food $20.00 $20.00
Assets:Cash $-20.00 0
__ERROR__
Warning: "$sourcepath/test/baseline/dir-tag.test", line 8: Metadata check failed for (Happy: Summer): (value == "Valley")
end test
#test reg
#12-Feb-27 KFC Expenses:Unknown $20.00 $20.00
# Assets:Cash $-20.00 0
#12-Feb-28 KFC food $20.00 $20.00
# Assets:Cash $-20.00 0
#__ERROR__
#Warning: "$sourcepath/test/baseline/dir-tag.test", line 8: Metadata check failed for (Happy: Summer): (value == "Valley")
#end test
#

View File

@ -16,24 +16,25 @@
Expenses:Food -10 CHIK {{$50}}
Equity:Capital Gains $-25
comment
$ hledger -f- check
test print
2012/03/09 KFC
Expenses:Food 10 CHIK @ $50
Assets:Cash
2012/03/09 KFC
Assets:Cash $75
Expenses:Food -10 CHIK {$5} @ $75
Equity:Capital Gains $-25
2012/03/09 KFC
Expenses:Food 10 CHIK
Assets:Cash $-50
2012/03/09 KFC
Assets:Cash $75
Expenses:Food -10 CHIK {$5}
Equity:Capital Gains $-25
end test
#test print
#2012/03/09 KFC
# Expenses:Food 10 CHIK @ $50
# Assets:Cash
#
#2012/03/09 KFC
# Assets:Cash $75
# Expenses:Food -10 CHIK {$5} @ $75
# Equity:Capital Gains $-25
#
#2012/03/09 KFC
# Expenses:Food 10 CHIK
# Assets:Cash $-50
#
#2012/03/09 KFC
# Assets:Cash $75
# Expenses:Food -10 CHIK {$5}
# Equity:Capital Gains $-25
#end test
#

View File

@ -26,12 +26,13 @@
Expenses:Cash
Assets:Cash = ($4,000.00 + $100.00)
comment
$ hledger -f- check
test bal
$4,100.00 Assets:Cash
$-10,000.00 Equity:Opening Balances
$5,900.00 Expenses:Cash
--------------------
0
end test
#test bal
# $4,100.00 Assets:Cash
# $-10,000.00 Equity:Opening Balances
# $5,900.00 Expenses:Cash
#--------------------
# 0
#end test
#

View File

@ -7,14 +7,15 @@
Expenses:Foo $10
Assets:Cash -$10 = $80
comment
test bal -> 1
__ERROR__
While parsing file "$FILE", line 8:
While parsing posting:
Assets:Cash -$10 = $80
^^^
Error: Balance assertion off by $-10 (expected to see $90)
end test
$ hledger -f- check
#test bal -> 1
#__ERROR__
#While parsing file "$FILE", line 8:
#While parsing posting:
# Assets:Cash -$10 = $80
# ^^^
#Error: Balance assertion off by $-10 (expected to see $90)
#end test
#
#

View File

@ -5,11 +5,12 @@
2012-01-01 Reconciliation
[Assets:Checking] = $100
comment
$ hledger -f- check
test balance
$100 Assets:Checking
$-100 Equity
--------------------
0
end test
#test balance
# $100 Assets:Checking
# $-100 Equity
#--------------------
# 0
#end test
#

View File

@ -51,12 +51,13 @@
Liabilities:MasterCard $150.00
Assets:Checking $-150.00 = $150.00
comment
$ hledger -f- check
test balance
$300.00 Expenses:Unknown
$-450.00 Income
$150.00 Liabilities:MasterCard
--------------------
0
end test
#test balance
# $300.00 Expenses:Unknown
# $-450.00 Income
# $150.00 Liabilities:MasterCard
#--------------------
# 0
#end test
#

View File

@ -7,14 +7,15 @@
check account("Assets:Checking").all(account =~ /Expense/)
comment
$ hledger -f- check
test bal
$-100 Assets:Checking
$100 Expenses:Food
--------------------
0
__ERROR__
Warning: "$sourcepath/test/baseline/feat-check.test", line 6: Transaction check failed: (account =~ /Foo/)
Warning: "$sourcepath/test/baseline/feat-check.test", line 8: Check failed: account("Assets:Checking").all(account =~ /Expense/)
end test
#test bal
# $-100 Assets:Checking
# $100 Expenses:Food
#--------------------
# 0
#__ERROR__
#Warning: "$sourcepath/test/baseline/feat-check.test", line 6: Transaction check failed: (account =~ /Foo/)
#Warning: "$sourcepath/test/baseline/feat-check.test", line 8: Check failed: account("Assets:Checking").all(account =~ /Expense/)
#end test
#

View File

@ -6,25 +6,26 @@ payee REWE
alias REWE SAGT DANKE
# When reading csv file without directives:
comment
$ hledger -f- check
test -f /dev/null convert test/baseline/feat-convert-with-directives.dat
2012/01/01 * KFC
Expenses:Unknown $10
Equity:Unknown
2012/01/02 * REWE SAGT DANKE 123454321
Expenses:Unknown 10€
Equity:Unknown
end test
# When reading csv file with directives:
test --account "Assets:Cash" convert test/baseline/feat-convert-with-directives.dat
2012/01/01 * KFC
Expenses:Food $10
Assets:Cash
2012/01/02 * REWE
Expenses:Food 10€
Assets:Cash
end test
#test -f /dev/null convert test/baseline/feat-convert-with-directives.dat
#2012/01/01 * KFC
# Expenses:Unknown $10
# Equity:Unknown
#
#2012/01/02 * REWE SAGT DANKE 123454321
# Expenses:Unknown 10€
# Equity:Unknown
#end test
#
## When reading csv file with directives:
#test --account "Assets:Cash" convert test/baseline/feat-convert-with-directives.dat
#2012/01/01 * KFC
# Expenses:Food $10
# Assets:Cash
#
#2012/01/02 * REWE
# Expenses:Food 10€
# Assets:Cash
#end test
#

View File

@ -16,11 +16,12 @@ P 1990/02/15 12:00:00 FOO $3
Expenses:Gas 100 FOO
Liabilities:MasterCard
comment
$ hledger -f- check
test reg -V gas
90-Jan-01 Payee Expenses:Gas $200 $200
90-Feb-01 Payee Expenses:Gas $200 $400
90-Feb-20 Commodities revalued <Revalued> $100 $500
90-Feb-20 Payee Expenses:Gas $300 $800
end test
#test reg -V gas
#90-Jan-01 Payee Expenses:Gas $200 $200
#90-Feb-01 Payee Expenses:Gas $200 $400
#90-Feb-20 Commodities revalued <Revalued> $100 $500
#90-Feb-20 Payee Expenses:Gas $300 $800
#end test
#

View File

@ -13,13 +13,14 @@ tag PATH
Expenses:Food $20
Assets:Cash
comment
$ hledger -f- check
test reg
12-Feb-29 KFC Expenses:Food $20 $20
Assets:Cash $-20 0
12-Feb-29 KFC Expenses:Food $20 $20
Assets:Cash $-20 0
__ERROR__
Warning: "$sourcepath/test/baseline/feat-import_py.test", line 14: Metadata check failed for (PATH: test/baseline/feat-import_noexist.test): check_path(value)
end test
#test reg
#12-Feb-29 KFC Expenses:Food $20 $20
# Assets:Cash $-20 0
#12-Feb-29 KFC Expenses:Food $20 $20
# Assets:Cash $-20 0
#__ERROR__
#Warning: "$sourcepath/test/baseline/feat-import_py.test", line 14: Metadata check failed for (PATH: test/baseline/feat-import_noexist.test): check_path(value)
#end test
#

View File

@ -8,9 +8,10 @@ python
--pyfirst
--pysecond Hey
comment
$ hledger -f- check
test reg
In --pyfirst (from $FILE)
In --pysecond=Hey (from $FILE)
end test
#test reg
#In --pyfirst (from $FILE)
#In --pysecond=Hey (from $FILE)
#end test
#

View File

@ -87,15 +87,16 @@ account Expenses:Food5
Expenses:Dining9 $1
Assets:Cash9
comment
$ hledger -f- check
test reg -V food
12-Mar-02 KFC Expenses:Food2 2 EUR 2 EUR
12-Mar-03 KFC Expenses:Food3 3 EUR 5 EUR
12-Mar-04 KFC Expenses:Food4 4 EUR 9 EUR
12-Mar-05 KFC Expenses:Food5 5 EUR 14 EUR
12-Mar-06 KFC Expenses:Food6 6 EUR 20 EUR
12-Mar-07 KFC Expenses:Food7 7 EUR 27 EUR
12-Mar-08 XACT Expenses:Food8 8 EUR 35 EUR
12-Mar-09 POST (Expenses:Food9) 9 EUR 44 EUR
end test
#test reg -V food
#12-Mar-02 KFC Expenses:Food2 2 EUR 2 EUR
#12-Mar-03 KFC Expenses:Food3 3 EUR 5 EUR
#12-Mar-04 KFC Expenses:Food4 4 EUR 9 EUR
#12-Mar-05 KFC Expenses:Food5 5 EUR 14 EUR
#12-Mar-06 KFC Expenses:Food6 6 EUR 20 EUR
#12-Mar-07 KFC Expenses:Food7 7 EUR 27 EUR
#12-Mar-08 XACT Expenses:Food8 8 EUR 35 EUR
#12-Mar-09 POST (Expenses:Food9) 9 EUR 44 EUR
#end test
#

View File

@ -12,15 +12,16 @@ eval print_type("Hello!")
eval print_type(/Hello!/)
;eval print_type((1, 2, 3))
comment
$$$ hledger -f- check
test reg
<type 'bool'> True
<type 'datetime.date'> 2010-08-10
<class 'ledger.Amount'> 10
<class 'ledger.Amount'> $10.00
<class 'ledger.Balance'> $10.00
CAD 30
<type 'unicode'> Hello!
<class 'ledger.Value'> Hello!
end test
#test reg
#<type 'bool'> True
#<type 'datetime.date'> 2010-08-10
#<class 'ledger.Amount'> 10
#<class 'ledger.Amount'> $10.00
#<class 'ledger.Balance'> $10.00
#CAD 30
#<type 'unicode'> Hello!
#<class 'ledger.Value'> Hello!
#end test
#

View File

@ -12,15 +12,16 @@ eval print_type("Hello!")
eval print_type(/Hello!/)
;eval print_type((1, 2, 3))
comment
$$$ hledger -f- check
test reg
<class 'bool'> True
<class 'datetime.date'> 2010-08-10
<class 'ledger.Amount'> 10
<class 'ledger.Amount'> $10.00
<class 'ledger.Balance'> $10.00
CAD 30
<class 'str'> Hello!
<class 'ledger.Value'> Hello!
end test
#test reg
#<class 'bool'> True
#<class 'datetime.date'> 2010-08-10
#<class 'ledger.Amount'> 10
#<class 'ledger.Amount'> $10.00
#<class 'ledger.Balance'> $10.00
#CAD 30
#<class 'str'> Hello!
#<class 'ledger.Value'> Hello!
#end test
#

View File

@ -2,10 +2,11 @@
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
$ hledger -f- check
test reg --abbrev-len=4
07-Feb-02 RD VMMXX Asse:Inve:Vangua:VMMXX 0.350 VMMXX 0.350 VMMXX
Inco:Divi:Vangua:VMMXX $-0.35 $-0.35
0.350 VMMXX
end test
#test reg --abbrev-len=4
#07-Feb-02 RD VMMXX Asse:Inve:Vangua:VMMXX 0.350 VMMXX 0.350 VMMXX
# Inco:Divi:Vangua:VMMXX $-0.35 $-0.35
# 0.350 VMMXX
#end test
#

View File

@ -2,10 +2,11 @@
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
$ hledger -f- check
test reg --account-width=40
07-Feb-02 RD VMMXX Assets:Investments:Vanguard:VMMXX 0.350 VMMXX 0.350 VMMXX
Income:Dividends:Vanguard:VMMXX $-0.35 $-0.35
0.350 VMMXX
end test
#test reg --account-width=40
#07-Feb-02 RD VMMXX Assets:Investments:Vanguard:VMMXX 0.350 VMMXX 0.350 VMMXX
# Income:Dividends:Vanguard:VMMXX $-0.35 $-0.35
# 0.350 VMMXX
#end test
#

View File

@ -2,10 +2,11 @@
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
$ hledger -f- check
test reg --account='payee + ":" + commodity'
07-Feb-02 RD VMMXX RD:VM:As:In:Vang:VMMXX 0.350 VMMXX 0.350 VMMXX
07-Feb-02 RD VMMXX RD:$:In:Di:Vangu:VMMXX $-0.35 $-0.35
0.350 VMMXX
end test
#test reg --account='payee + ":" + commodity'
#07-Feb-02 RD VMMXX RD:VM:As:In:Vang:VMMXX 0.350 VMMXX 0.350 VMMXX
#07-Feb-02 RD VMMXX RD:$:In:Di:Vangu:VMMXX $-0.35 $-0.35
# 0.350 VMMXX
#end test
#

View File

@ -6,10 +6,11 @@
Expenses:Books $10.00
Assets:Cash $-10.00
comment
$ hledger -f- check
test print --actual
2008/01/01 January
Expenses:Books $10.00
Assets:Cash $-10.00
end test
#test print --actual
#2008/01/01 January
# Expenses:Books $10.00
# Assets:Cash $-10.00
#end test
#

View File

@ -242,127 +242,128 @@
Liabilities:Cards $120.00
Assets:Cash
comment
$ hledger -f- check
test reg --add-budget books cards --now=2009/12/31
08-Jan-01 Budget transaction Expenses:Books $-10.00 $-10.00
08-Jan-01 January Expenses:Books $10.00 0
Liabilities:Cards $10.00 $10.00
08-Jan-31 End of January Expenses:Books $10.00 $20.00
Liabilities:Cards $10.00 $30.00
08-Feb-01 Budget transaction Expenses:Books $-10.00 $20.00
08-Feb-01 February Expenses:Books $20.00 $40.00
Liabilities:Cards $20.00 $60.00
08-Feb-28 End of February Expenses:Books $20.00 $80.00
Liabilities:Cards $20.00 $100.00
08-Mar-01 Budget transaction Expenses:Books $-10.00 $90.00
08-Mar-01 March Expenses:Books $30.00 $120.00
Liabilities:Cards $30.00 $150.00
08-Mar-31 End of March Expenses:Books $30.00 $180.00
Liabilities:Cards $30.00 $210.00
08-Apr-01 Budget transaction Expenses:Books $-10.00 $200.00
08-Apr-01 April Expenses:Books $40.00 $240.00
Liabilities:Cards $40.00 $280.00
08-Apr-30 End of April Expenses:Books $40.00 $320.00
Liabilities:Cards $40.00 $360.00
08-May-01 Budget transaction Expenses:Books $-10.00 $350.00
08-May-01 May Expenses:Books $50.00 $400.00
Liabilities:Cards $50.00 $450.00
08-May-31 End of May Expenses:Books $50.00 $500.00
Liabilities:Cards $50.00 $550.00
08-Jun-01 Budget transaction Expenses:Books $-10.00 $540.00
08-Jun-01 June Expenses:Books $60.00 $600.00
Liabilities:Cards $60.00 $660.00
08-Jun-30 End of June Expenses:Books $60.00 $720.00
Liabilities:Cards $60.00 $780.00
08-Jul-01 Budget transaction Expenses:Books $-10.00 $770.00
08-Jul-01 July Expenses:Books $70.00 $840.00
Liabilities:Cards $70.00 $910.00
08-Jul-31 End of July Expenses:Books $70.00 $980.00
Liabilities:Cards $70.00 $1050.00
08-Aug-01 Budget transaction Expenses:Books $-10.00 $1040.00
08-Aug-01 August Expenses:Books $80.00 $1120.00
Liabilities:Cards $80.00 $1200.00
08-Aug-31 End of August Expenses:Books $80.00 $1280.00
Liabilities:Cards $80.00 $1360.00
08-Sep-01 Budget transaction Expenses:Books $-10.00 $1350.00
08-Sep-01 September Expenses:Books $90.00 $1440.00
Liabilities:Cards $90.00 $1530.00
08-Sep-30 End of September Expenses:Books $90.00 $1620.00
Liabilities:Cards $90.00 $1710.00
08-Oct-01 Budget transaction Expenses:Books $-10.00 $1700.00
08-Oct-01 October Expenses:Books $100.00 $1800.00
Liabilities:Cards $100.00 $1900.00
08-Oct-31 End of October Expenses:Books $100.00 $2000.00
Liabilities:Cards $100.00 $2100.00
08-Nov-01 Budget transaction Expenses:Books $-10.00 $2090.00
08-Nov-01 November Expenses:Books $110.00 $2200.00
Liabilities:Cards $110.00 $2310.00
08-Nov-30 End of November Expenses:Books $110.00 $2420.00
Liabilities:Cards $110.00 $2530.00
08-Dec-01 Budget transaction Expenses:Books $-10.00 $2520.00
08-Dec-01 December Expenses:Books $120.00 $2640.00
Liabilities:Cards $120.00 $2760.00
08-Dec-31 End of December Expenses:Books $120.00 $2880.00
Liabilities:Cards $120.00 $3000.00
09-Jan-01 Budget transaction Expenses:Books $-10.00 $2990.00
09-Jan-01 January Expenses:Books $10.00 $3000.00
Liabilities:Cards $10.00 $3010.00
09-Jan-31 End of January Expenses:Books $10.00 $3020.00
Liabilities:Cards $10.00 $3030.00
09-Feb-01 Budget transaction Expenses:Books $-10.00 $3020.00
09-Feb-01 February Expenses:Books $20.00 $3040.00
Liabilities:Cards $20.00 $3060.00
09-Feb-28 End of February Expenses:Books $20.00 $3080.00
Liabilities:Cards $20.00 $3100.00
09-Mar-01 Budget transaction Expenses:Books $-10.00 $3090.00
09-Mar-01 March Expenses:Books $30.00 $3120.00
Liabilities:Cards $30.00 $3150.00
09-Mar-31 End of March Expenses:Books $30.00 $3180.00
Liabilities:Cards $30.00 $3210.00
09-Apr-01 Budget transaction Expenses:Books $-10.00 $3200.00
09-Apr-01 April Expenses:Books $40.00 $3240.00
Liabilities:Cards $40.00 $3280.00
09-Apr-30 End of April Expenses:Books $40.00 $3320.00
Liabilities:Cards $40.00 $3360.00
09-May-01 Budget transaction Expenses:Books $-10.00 $3350.00
09-May-01 May Expenses:Books $50.00 $3400.00
Liabilities:Cards $50.00 $3450.00
09-May-31 End of May Expenses:Books $50.00 $3500.00
Liabilities:Cards $50.00 $3550.00
09-Jun-01 Budget transaction Expenses:Books $-10.00 $3540.00
09-Jun-01 June Expenses:Books $60.00 $3600.00
Liabilities:Cards $60.00 $3660.00
09-Jun-30 End of June Expenses:Books $60.00 $3720.00
Liabilities:Cards $60.00 $3780.00
09-Jul-01 Budget transaction Expenses:Books $-10.00 $3770.00
09-Jul-01 July Expenses:Books $70.00 $3840.00
Liabilities:Cards $70.00 $3910.00
09-Jul-31 End of July Expenses:Books $70.00 $3980.00
Liabilities:Cards $70.00 $4050.00
09-Aug-01 Budget transaction Expenses:Books $-10.00 $4040.00
09-Aug-01 August Expenses:Books $80.00 $4120.00
Liabilities:Cards $80.00 $4200.00
09-Aug-31 End of August Expenses:Books $80.00 $4280.00
Liabilities:Cards $80.00 $4360.00
09-Sep-01 Budget transaction Expenses:Books $-10.00 $4350.00
09-Sep-01 September Expenses:Books $90.00 $4440.00
Liabilities:Cards $90.00 $4530.00
09-Sep-30 End of September Expenses:Books $90.00 $4620.00
Liabilities:Cards $90.00 $4710.00
09-Oct-01 Budget transaction Expenses:Books $-10.00 $4700.00
09-Oct-01 October Expenses:Books $100.00 $4800.00
Liabilities:Cards $100.00 $4900.00
09-Oct-31 End of October Expenses:Books $100.00 $5000.00
Liabilities:Cards $100.00 $5100.00
09-Nov-01 Budget transaction Expenses:Books $-10.00 $5090.00
09-Nov-01 November Expenses:Books $110.00 $5200.00
Liabilities:Cards $110.00 $5310.00
09-Nov-30 End of November Expenses:Books $110.00 $5420.00
Liabilities:Cards $110.00 $5530.00
09-Dec-01 Budget transaction Expenses:Books $-10.00 $5520.00
09-Dec-01 December Expenses:Books $120.00 $5640.00
Liabilities:Cards $120.00 $5760.00
09-Dec-31 End of December Expenses:Books $120.00 $5880.00
Liabilities:Cards $120.00 $6000.00
end test
#test reg --add-budget books cards --now=2009/12/31
#08-Jan-01 Budget transaction Expenses:Books $-10.00 $-10.00
#08-Jan-01 January Expenses:Books $10.00 0
# Liabilities:Cards $10.00 $10.00
#08-Jan-31 End of January Expenses:Books $10.00 $20.00
# Liabilities:Cards $10.00 $30.00
#08-Feb-01 Budget transaction Expenses:Books $-10.00 $20.00
#08-Feb-01 February Expenses:Books $20.00 $40.00
# Liabilities:Cards $20.00 $60.00
#08-Feb-28 End of February Expenses:Books $20.00 $80.00
# Liabilities:Cards $20.00 $100.00
#08-Mar-01 Budget transaction Expenses:Books $-10.00 $90.00
#08-Mar-01 March Expenses:Books $30.00 $120.00
# Liabilities:Cards $30.00 $150.00
#08-Mar-31 End of March Expenses:Books $30.00 $180.00
# Liabilities:Cards $30.00 $210.00
#08-Apr-01 Budget transaction Expenses:Books $-10.00 $200.00
#08-Apr-01 April Expenses:Books $40.00 $240.00
# Liabilities:Cards $40.00 $280.00
#08-Apr-30 End of April Expenses:Books $40.00 $320.00
# Liabilities:Cards $40.00 $360.00
#08-May-01 Budget transaction Expenses:Books $-10.00 $350.00
#08-May-01 May Expenses:Books $50.00 $400.00
# Liabilities:Cards $50.00 $450.00
#08-May-31 End of May Expenses:Books $50.00 $500.00
# Liabilities:Cards $50.00 $550.00
#08-Jun-01 Budget transaction Expenses:Books $-10.00 $540.00
#08-Jun-01 June Expenses:Books $60.00 $600.00
# Liabilities:Cards $60.00 $660.00
#08-Jun-30 End of June Expenses:Books $60.00 $720.00
# Liabilities:Cards $60.00 $780.00
#08-Jul-01 Budget transaction Expenses:Books $-10.00 $770.00
#08-Jul-01 July Expenses:Books $70.00 $840.00
# Liabilities:Cards $70.00 $910.00
#08-Jul-31 End of July Expenses:Books $70.00 $980.00
# Liabilities:Cards $70.00 $1050.00
#08-Aug-01 Budget transaction Expenses:Books $-10.00 $1040.00
#08-Aug-01 August Expenses:Books $80.00 $1120.00
# Liabilities:Cards $80.00 $1200.00
#08-Aug-31 End of August Expenses:Books $80.00 $1280.00
# Liabilities:Cards $80.00 $1360.00
#08-Sep-01 Budget transaction Expenses:Books $-10.00 $1350.00
#08-Sep-01 September Expenses:Books $90.00 $1440.00
# Liabilities:Cards $90.00 $1530.00
#08-Sep-30 End of September Expenses:Books $90.00 $1620.00
# Liabilities:Cards $90.00 $1710.00
#08-Oct-01 Budget transaction Expenses:Books $-10.00 $1700.00
#08-Oct-01 October Expenses:Books $100.00 $1800.00
# Liabilities:Cards $100.00 $1900.00
#08-Oct-31 End of October Expenses:Books $100.00 $2000.00
# Liabilities:Cards $100.00 $2100.00
#08-Nov-01 Budget transaction Expenses:Books $-10.00 $2090.00
#08-Nov-01 November Expenses:Books $110.00 $2200.00
# Liabilities:Cards $110.00 $2310.00
#08-Nov-30 End of November Expenses:Books $110.00 $2420.00
# Liabilities:Cards $110.00 $2530.00
#08-Dec-01 Budget transaction Expenses:Books $-10.00 $2520.00
#08-Dec-01 December Expenses:Books $120.00 $2640.00
# Liabilities:Cards $120.00 $2760.00
#08-Dec-31 End of December Expenses:Books $120.00 $2880.00
# Liabilities:Cards $120.00 $3000.00
#09-Jan-01 Budget transaction Expenses:Books $-10.00 $2990.00
#09-Jan-01 January Expenses:Books $10.00 $3000.00
# Liabilities:Cards $10.00 $3010.00
#09-Jan-31 End of January Expenses:Books $10.00 $3020.00
# Liabilities:Cards $10.00 $3030.00
#09-Feb-01 Budget transaction Expenses:Books $-10.00 $3020.00
#09-Feb-01 February Expenses:Books $20.00 $3040.00
# Liabilities:Cards $20.00 $3060.00
#09-Feb-28 End of February Expenses:Books $20.00 $3080.00
# Liabilities:Cards $20.00 $3100.00
#09-Mar-01 Budget transaction Expenses:Books $-10.00 $3090.00
#09-Mar-01 March Expenses:Books $30.00 $3120.00
# Liabilities:Cards $30.00 $3150.00
#09-Mar-31 End of March Expenses:Books $30.00 $3180.00
# Liabilities:Cards $30.00 $3210.00
#09-Apr-01 Budget transaction Expenses:Books $-10.00 $3200.00
#09-Apr-01 April Expenses:Books $40.00 $3240.00
# Liabilities:Cards $40.00 $3280.00
#09-Apr-30 End of April Expenses:Books $40.00 $3320.00
# Liabilities:Cards $40.00 $3360.00
#09-May-01 Budget transaction Expenses:Books $-10.00 $3350.00
#09-May-01 May Expenses:Books $50.00 $3400.00
# Liabilities:Cards $50.00 $3450.00
#09-May-31 End of May Expenses:Books $50.00 $3500.00
# Liabilities:Cards $50.00 $3550.00
#09-Jun-01 Budget transaction Expenses:Books $-10.00 $3540.00
#09-Jun-01 June Expenses:Books $60.00 $3600.00
# Liabilities:Cards $60.00 $3660.00
#09-Jun-30 End of June Expenses:Books $60.00 $3720.00
# Liabilities:Cards $60.00 $3780.00
#09-Jul-01 Budget transaction Expenses:Books $-10.00 $3770.00
#09-Jul-01 July Expenses:Books $70.00 $3840.00
# Liabilities:Cards $70.00 $3910.00
#09-Jul-31 End of July Expenses:Books $70.00 $3980.00
# Liabilities:Cards $70.00 $4050.00
#09-Aug-01 Budget transaction Expenses:Books $-10.00 $4040.00
#09-Aug-01 August Expenses:Books $80.00 $4120.00
# Liabilities:Cards $80.00 $4200.00
#09-Aug-31 End of August Expenses:Books $80.00 $4280.00
# Liabilities:Cards $80.00 $4360.00
#09-Sep-01 Budget transaction Expenses:Books $-10.00 $4350.00
#09-Sep-01 September Expenses:Books $90.00 $4440.00
# Liabilities:Cards $90.00 $4530.00
#09-Sep-30 End of September Expenses:Books $90.00 $4620.00
# Liabilities:Cards $90.00 $4710.00
#09-Oct-01 Budget transaction Expenses:Books $-10.00 $4700.00
#09-Oct-01 October Expenses:Books $100.00 $4800.00
# Liabilities:Cards $100.00 $4900.00
#09-Oct-31 End of October Expenses:Books $100.00 $5000.00
# Liabilities:Cards $100.00 $5100.00
#09-Nov-01 Budget transaction Expenses:Books $-10.00 $5090.00
#09-Nov-01 November Expenses:Books $110.00 $5200.00
# Liabilities:Cards $110.00 $5310.00
#09-Nov-30 End of November Expenses:Books $110.00 $5420.00
# Liabilities:Cards $110.00 $5530.00
#09-Dec-01 Budget transaction Expenses:Books $-10.00 $5520.00
#09-Dec-01 December Expenses:Books $120.00 $5640.00
# Liabilities:Cards $120.00 $5760.00
#09-Dec-31 End of December Expenses:Books $120.00 $5880.00
# Liabilities:Cards $120.00 $6000.00
#end test
#

View File

@ -2,9 +2,10 @@
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
$ hledger -f- check
test reg --amount-data
2007-02-02 0.35
2007-02-02 -0.35
end test
#test reg --amount-data
#2007-02-02 0.35
#2007-02-02 -0.35
#end test
#

View File

@ -2,10 +2,11 @@
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
$ hledger -f- check
test reg --amount-width=18
07-Feb-02 RD VMMXX As:Investm:Vanguar:VMMXX 0.350 VMMXX 0.350 VMMXX
In:Dividen:Vanguar:VMMXX $-0.35 $-0.35
0.350 VMMXX
end test
#test reg --amount-width=18
#07-Feb-02 RD VMMXX As:Investm:Vanguar:VMMXX 0.350 VMMXX 0.350 VMMXX
# In:Dividen:Vanguar:VMMXX $-0.35 $-0.35
# 0.350 VMMXX
#end test
#

View File

@ -2,9 +2,10 @@
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
$ hledger -f- check
test reg --amount=10
07-Feb-02 RD VMMXX As:Inves:Vanguar:VMMXX 10 10
In:Divid:Vanguar:VMMXX 10 20
end test
#test reg --amount=10
#07-Feb-02 RD VMMXX As:Inves:Vanguar:VMMXX 10 10
# In:Divid:Vanguar:VMMXX 10 20
#end test
#

View File

@ -14,60 +14,61 @@
Expenses:Food 20.00 EUR
Liabilities:CC -20.00 EUR
comment
$ hledger -f- check
test --input-date-format "%Y-%m-%d" convert test/baseline/opt-auto-match.dat
2012/03/01 * Food
Expenses:Unknown 10
Equity:Unknown
2012/03/02 * Phone
Expenses:Unknown 10
Equity:Unknown
2012/03/02 * Dining
Expenses:Unknown 10
Equity:Unknown
end test
test --input-date-format "%Y-%m-%d" --auto-match convert test/baseline/opt-auto-match.dat
2012/03/01 * Food
Expenses:Food 10
Equity:Unknown
2012/03/02 * Phone
Expenses:Phone 10
Equity:Unknown
2012/03/02 * Dining
Expenses:Food 10
Equity:Unknown
end test
test --input-date-format "%Y-%m-%d" --account Assets:Bank convert test/baseline/opt-auto-match.dat
2012/03/01 * Food
Expenses:Unknown 10
Assets:Bank
2012/03/02 * Phone
Expenses:Unknown 10
Assets:Bank
2012/03/02 * Dining
Expenses:Unknown 10
Assets:Bank
end test
test --input-date-format "%Y-%m-%d" --auto-match --account Assets:Bank convert test/baseline/opt-auto-match.dat
2012/03/01 * Food
Expenses:Food 10
Assets:Bank
2012/03/02 * Phone
Expenses:Phone 10
Assets:Bank
2012/03/02 * Dining
Expenses:Food 10
Assets:Bank
end test
#test --input-date-format "%Y-%m-%d" convert test/baseline/opt-auto-match.dat
#2012/03/01 * Food
# Expenses:Unknown 10
# Equity:Unknown
#
#2012/03/02 * Phone
# Expenses:Unknown 10
# Equity:Unknown
#
#2012/03/02 * Dining
# Expenses:Unknown 10
# Equity:Unknown
#end test
#
#test --input-date-format "%Y-%m-%d" --auto-match convert test/baseline/opt-auto-match.dat
#2012/03/01 * Food
# Expenses:Food 10
# Equity:Unknown
#
#2012/03/02 * Phone
# Expenses:Phone 10
# Equity:Unknown
#
#2012/03/02 * Dining
# Expenses:Food 10
# Equity:Unknown
#end test
#
#test --input-date-format "%Y-%m-%d" --account Assets:Bank convert test/baseline/opt-auto-match.dat
#2012/03/01 * Food
# Expenses:Unknown 10
# Assets:Bank
#
#2012/03/02 * Phone
# Expenses:Unknown 10
# Assets:Bank
#
#2012/03/02 * Dining
# Expenses:Unknown 10
# Assets:Bank
#end test
#
#test --input-date-format "%Y-%m-%d" --auto-match --account Assets:Bank convert test/baseline/opt-auto-match.dat
#2012/03/01 * Food
# Expenses:Food 10
# Assets:Bank
#
#2012/03/02 * Phone
# Expenses:Phone 10
# Assets:Bank
#
#2012/03/02 * Dining
# Expenses:Food 10
# Assets:Bank
#end test
#

View File

@ -10,13 +10,14 @@
Expenses:Books $20.00
Assets:Cash
comment
$ hledger -f- check
test reg --aux-date
08-Jan-01 January Expenses:Books $10.00 $10.00
Assets:Cash $-10.00 0
08-Feb-01 End of January Expenses:Books $10.00 $10.00
08-Jan-01 End of January Assets:Cash $-10.00 0
08-Feb-01 February Expenses:Books $20.00 $20.00
Assets:Cash $-20.00 0
end test
#test reg --aux-date
#08-Jan-01 January Expenses:Books $10.00 $10.00
# Assets:Cash $-10.00 0
#08-Feb-01 End of January Expenses:Books $10.00 $10.00
#08-Jan-01 End of January Assets:Cash $-10.00 0
#08-Feb-01 February Expenses:Books $20.00 $20.00
# Assets:Cash $-20.00 0
#end test
#

View File

@ -10,9 +10,10 @@
Assets:Investments 1 FOO @ 180.00 EUR
Assets:Investments -180.00 EUR
comment
$ hledger -f- check
test bal assets:investments --average-lot-prices
520.00 EUR
3 FOO {160.00 EUR} Assets:Investments
end test
#test bal assets:investments --average-lot-prices
# 520.00 EUR
# 3 FOO {160.00 EUR} Assets:Investments
#end test
#

View File

@ -190,55 +190,56 @@
Expenses:Books $120.00
Assets:Cash
comment
$ hledger -f- check
test reg --average books
08-Jan-01 January Expenses:Books $10.00 $10.00
08-Jan-31 End of January Expenses:Books $10.00 $10.00
08-Feb-01 February Expenses:Books $20.00 $13.33
08-Feb-28 End of February Expenses:Books $20.00 $15.00
08-Mar-01 March Expenses:Books $30.00 $18.00
08-Mar-31 End of March Expenses:Books $30.00 $20.00
08-Apr-01 April Expenses:Books $40.00 $22.86
08-Apr-30 End of April Expenses:Books $40.00 $25.00
08-May-01 May Expenses:Books $50.00 $27.78
08-May-31 End of May Expenses:Books $50.00 $30.00
08-Jun-01 June Expenses:Books $60.00 $32.73
08-Jun-30 End of June Expenses:Books $60.00 $35.00
08-Jul-01 July Expenses:Books $70.00 $37.69
08-Jul-31 End of July Expenses:Books $70.00 $40.00
08-Aug-01 August Expenses:Books $80.00 $42.67
08-Aug-31 End of August Expenses:Books $80.00 $45.00
08-Sep-01 September Expenses:Books $90.00 $47.65
08-Sep-30 End of September Expenses:Books $90.00 $50.00
08-Oct-01 October Expenses:Books $100.00 $52.63
08-Oct-31 End of October Expenses:Books $100.00 $55.00
08-Nov-01 November Expenses:Books $110.00 $57.62
08-Nov-30 End of November Expenses:Books $110.00 $60.00
08-Dec-01 December Expenses:Books $120.00 $62.61
08-Dec-31 End of December Expenses:Books $120.00 $65.00
09-Jan-01 January Expenses:Books $10.00 $62.80
09-Jan-31 End of January Expenses:Books $10.00 $60.77
09-Feb-01 February Expenses:Books $20.00 $59.26
09-Feb-28 End of February Expenses:Books $20.00 $57.86
09-Mar-01 March Expenses:Books $30.00 $56.90
09-Mar-31 End of March Expenses:Books $30.00 $56.00
09-Apr-01 April Expenses:Books $40.00 $55.48
09-Apr-30 End of April Expenses:Books $40.00 $55.00
09-May-01 May Expenses:Books $50.00 $54.85
09-May-31 End of May Expenses:Books $50.00 $54.71
09-Jun-01 June Expenses:Books $60.00 $54.86
09-Jun-30 End of June Expenses:Books $60.00 $55.00
09-Jul-01 July Expenses:Books $70.00 $55.41
09-Jul-31 End of July Expenses:Books $70.00 $55.79
09-Aug-01 August Expenses:Books $80.00 $56.41
09-Aug-31 End of August Expenses:Books $80.00 $57.00
09-Sep-01 September Expenses:Books $90.00 $57.80
09-Sep-30 End of September Expenses:Books $90.00 $58.57
09-Oct-01 October Expenses:Books $100.00 $59.53
09-Oct-31 End of October Expenses:Books $100.00 $60.45
09-Nov-01 November Expenses:Books $110.00 $61.56
09-Nov-30 End of November Expenses:Books $110.00 $62.61
09-Dec-01 December Expenses:Books $120.00 $63.83
09-Dec-31 End of December Expenses:Books $120.00 $65.00
end test
#test reg --average books
#08-Jan-01 January Expenses:Books $10.00 $10.00
#08-Jan-31 End of January Expenses:Books $10.00 $10.00
#08-Feb-01 February Expenses:Books $20.00 $13.33
#08-Feb-28 End of February Expenses:Books $20.00 $15.00
#08-Mar-01 March Expenses:Books $30.00 $18.00
#08-Mar-31 End of March Expenses:Books $30.00 $20.00
#08-Apr-01 April Expenses:Books $40.00 $22.86
#08-Apr-30 End of April Expenses:Books $40.00 $25.00
#08-May-01 May Expenses:Books $50.00 $27.78
#08-May-31 End of May Expenses:Books $50.00 $30.00
#08-Jun-01 June Expenses:Books $60.00 $32.73
#08-Jun-30 End of June Expenses:Books $60.00 $35.00
#08-Jul-01 July Expenses:Books $70.00 $37.69
#08-Jul-31 End of July Expenses:Books $70.00 $40.00
#08-Aug-01 August Expenses:Books $80.00 $42.67
#08-Aug-31 End of August Expenses:Books $80.00 $45.00
#08-Sep-01 September Expenses:Books $90.00 $47.65
#08-Sep-30 End of September Expenses:Books $90.00 $50.00
#08-Oct-01 October Expenses:Books $100.00 $52.63
#08-Oct-31 End of October Expenses:Books $100.00 $55.00
#08-Nov-01 November Expenses:Books $110.00 $57.62
#08-Nov-30 End of November Expenses:Books $110.00 $60.00
#08-Dec-01 December Expenses:Books $120.00 $62.61
#08-Dec-31 End of December Expenses:Books $120.00 $65.00
#09-Jan-01 January Expenses:Books $10.00 $62.80
#09-Jan-31 End of January Expenses:Books $10.00 $60.77
#09-Feb-01 February Expenses:Books $20.00 $59.26
#09-Feb-28 End of February Expenses:Books $20.00 $57.86
#09-Mar-01 March Expenses:Books $30.00 $56.90
#09-Mar-31 End of March Expenses:Books $30.00 $56.00
#09-Apr-01 April Expenses:Books $40.00 $55.48
#09-Apr-30 End of April Expenses:Books $40.00 $55.00
#09-May-01 May Expenses:Books $50.00 $54.85
#09-May-31 End of May Expenses:Books $50.00 $54.71
#09-Jun-01 June Expenses:Books $60.00 $54.86
#09-Jun-30 End of June Expenses:Books $60.00 $55.00
#09-Jul-01 July Expenses:Books $70.00 $55.41
#09-Jul-31 End of July Expenses:Books $70.00 $55.79
#09-Aug-01 August Expenses:Books $80.00 $56.41
#09-Aug-31 End of August Expenses:Books $80.00 $57.00
#09-Sep-01 September Expenses:Books $90.00 $57.80
#09-Sep-30 End of September Expenses:Books $90.00 $58.57
#09-Oct-01 October Expenses:Books $100.00 $59.53
#09-Oct-31 End of October Expenses:Books $100.00 $60.45
#09-Nov-01 November Expenses:Books $110.00 $61.56
#09-Nov-30 End of November Expenses:Books $110.00 $62.61
#09-Dec-01 December Expenses:Books $120.00 $63.83
#09-Dec-31 End of December Expenses:Books $120.00 $65.00
#end test
#

View File

@ -2,9 +2,10 @@
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
$ hledger -f- check
test bal --balance-format='%(account)\n' --no-total
Assets:Investments:Vanguard:VMMXX
Income:Dividends:Vanguard:VMMXX
end test
#test bal --balance-format='%(account)\n' --no-total
#Assets:Investments:Vanguard:VMMXX
#Income:Dividends:Vanguard:VMMXX
#end test
#

View File

@ -12,17 +12,18 @@ o 2007/03/12 01:00:00
Income:Contracts -40h {$20} @ $100.00
Income:Gains $-3,200.00
comment
$ hledger -f- check
test bal --base
7200s A
$8,000.00 Assets:Receivable
7200s B
$-3,200.00
-288000s Income
-288000s Contracts
$-3,200.00 Gains
--------------------
$4,800.00
-273600s
end test
#test bal --base
# 7200s A
# $8,000.00 Assets:Receivable
# 7200s B
# $-3,200.00
# -288000s Income
# -288000s Contracts
# $-3,200.00 Gains
#--------------------
# $4,800.00
# -273600s
#end test
#

View File

@ -2,11 +2,12 @@
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
$ hledger -f- check
test bal --basis
$0.35 Assets:Investments:Vanguard:VMMXX
$-0.35 Income:Dividends:Vanguard:VMMXX
--------------------
0
end test
#test bal --basis
# $0.35 Assets:Investments:Vanguard:VMMXX
# $-0.35 Income:Dividends:Vanguard:VMMXX
#--------------------
# 0
#end test
#

View File

@ -190,51 +190,52 @@
Expenses:Books $120.00
Assets:Cash
comment
$ hledger -f- check
test reg --begin=2009/02
09-Feb-01 February Expenses:Books $20.00 $20.00
Assets:Cash $-20.00 0
09-Feb-28 End of February Expenses:Books $20.00 $20.00
Assets:Cash $-20.00 0
09-Mar-01 March Expenses:Books $30.00 $30.00
Assets:Cash $-30.00 0
09-Mar-31 End of March Expenses:Books $30.00 $30.00
Assets:Cash $-30.00 0
09-Apr-01 April Expenses:Books $40.00 $40.00
Assets:Cash $-40.00 0
09-Apr-30 End of April Expenses:Books $40.00 $40.00
Assets:Cash $-40.00 0
09-May-01 May Expenses:Books $50.00 $50.00
Assets:Cash $-50.00 0
09-May-31 End of May Expenses:Books $50.00 $50.00
Assets:Cash $-50.00 0
09-Jun-01 June Expenses:Books $60.00 $60.00
Assets:Cash $-60.00 0
09-Jun-30 End of June Expenses:Books $60.00 $60.00
Assets:Cash $-60.00 0
09-Jul-01 July Expenses:Books $70.00 $70.00
Assets:Cash $-70.00 0
09-Jul-31 End of July Expenses:Books $70.00 $70.00
Assets:Cash $-70.00 0
09-Aug-01 August Expenses:Books $80.00 $80.00
Assets:Cash $-80.00 0
09-Aug-31 End of August Expenses:Books $80.00 $80.00
Assets:Cash $-80.00 0
09-Sep-01 September Expenses:Books $90.00 $90.00
Assets:Cash $-90.00 0
09-Sep-30 End of September Expenses:Books $90.00 $90.00
Assets:Cash $-90.00 0
09-Oct-01 October Expenses:Books $100.00 $100.00
Assets:Cash $-100.00 0
09-Oct-31 End of October Expenses:Books $100.00 $100.00
Assets:Cash $-100.00 0
09-Nov-01 November Expenses:Books $110.00 $110.00
Assets:Cash $-110.00 0
09-Nov-30 End of November Expenses:Books $110.00 $110.00
Assets:Cash $-110.00 0
09-Dec-01 December Expenses:Books $120.00 $120.00
Assets:Cash $-120.00 0
09-Dec-31 End of December Expenses:Books $120.00 $120.00
Assets:Cash $-120.00 0
end test
#test reg --begin=2009/02
#09-Feb-01 February Expenses:Books $20.00 $20.00
# Assets:Cash $-20.00 0
#09-Feb-28 End of February Expenses:Books $20.00 $20.00
# Assets:Cash $-20.00 0
#09-Mar-01 March Expenses:Books $30.00 $30.00
# Assets:Cash $-30.00 0
#09-Mar-31 End of March Expenses:Books $30.00 $30.00
# Assets:Cash $-30.00 0
#09-Apr-01 April Expenses:Books $40.00 $40.00
# Assets:Cash $-40.00 0
#09-Apr-30 End of April Expenses:Books $40.00 $40.00
# Assets:Cash $-40.00 0
#09-May-01 May Expenses:Books $50.00 $50.00
# Assets:Cash $-50.00 0
#09-May-31 End of May Expenses:Books $50.00 $50.00
# Assets:Cash $-50.00 0
#09-Jun-01 June Expenses:Books $60.00 $60.00
# Assets:Cash $-60.00 0
#09-Jun-30 End of June Expenses:Books $60.00 $60.00
# Assets:Cash $-60.00 0
#09-Jul-01 July Expenses:Books $70.00 $70.00
# Assets:Cash $-70.00 0
#09-Jul-31 End of July Expenses:Books $70.00 $70.00
# Assets:Cash $-70.00 0
#09-Aug-01 August Expenses:Books $80.00 $80.00
# Assets:Cash $-80.00 0
#09-Aug-31 End of August Expenses:Books $80.00 $80.00
# Assets:Cash $-80.00 0
#09-Sep-01 September Expenses:Books $90.00 $90.00
# Assets:Cash $-90.00 0
#09-Sep-30 End of September Expenses:Books $90.00 $90.00
# Assets:Cash $-90.00 0
#09-Oct-01 October Expenses:Books $100.00 $100.00
# Assets:Cash $-100.00 0
#09-Oct-31 End of October Expenses:Books $100.00 $100.00
# Assets:Cash $-100.00 0
#09-Nov-01 November Expenses:Books $110.00 $110.00
# Assets:Cash $-110.00 0
#09-Nov-30 End of November Expenses:Books $110.00 $110.00
# Assets:Cash $-110.00 0
#09-Dec-01 December Expenses:Books $120.00 $120.00
# Assets:Cash $-120.00 0
#09-Dec-31 End of December Expenses:Books $120.00 $120.00
# Assets:Cash $-120.00 0
#end test
#

View File

@ -7,12 +7,13 @@
Expenses:Food 100.00 EUR
Assets:Cash -100.00 EUR
comment
test reg --bold-if 'has_tag("test")'
12-Jan-01 Opening balance Assets:Cash 100.00 EUR 100.00 EUR
Equity:Opening Balance -100.00 EUR 0
12-Jan-02 Test  Expenses:Food   100.00 EUR  100.00 EUR
  Assets:Cash   -100.00 EUR  0
end test
$ hledger -f- check
#test reg --bold-if 'has_tag("test")'
#12-Jan-01 Opening balance Assets:Cash 100.00 EUR 100.00 EUR
# Equity:Opening Balance -100.00 EUR 0
#12-Jan-02 Test  Expenses:Food   100.00 EUR  100.00 EUR
#   Assets:Cash   -100.00 EUR  0
#end test
#
#

View File

@ -11,13 +11,14 @@
Expenses:Rent 530.00 GBP
Assets:Cash -530.00 GBP
comment
test budget --now 2012-02-29 --budget-format "%(justify(scrub(display_total), 0))\n"
(-550.00 GBP, 560.00 GBP)
(550.00 GBP, -560.00 GBP)
(20.00 GBP, -10.00 GBP)
(530.00 GBP, -550.00 GBP)
(0, 0)
end test
$ hledger -f- check
#test budget --now 2012-02-29 --budget-format "%(justify(scrub(display_total), 0))\n"
#(-550.00 GBP, 560.00 GBP)
#(550.00 GBP, -560.00 GBP)
#(20.00 GBP, -10.00 GBP)
#(530.00 GBP, -550.00 GBP)
#(0, 0)
#end test
#
#

View File

@ -243,79 +243,80 @@
Liabilities:Cards $120.00
Assets:Cash
comment
$ hledger -f- check
test reg --budget books --now=2009/12/31
08-Jan-01 Budget transaction Expenses:Books $-10.00 $-10.00
08-Jan-01 January Expenses:Books $10.00 0
08-Jan-31 End of January Expenses:Books $10.00 $10.00
08-Feb-01 Budget transaction Expenses:Books $-10.00 0
08-Feb-01 February Expenses:Books $20.00 $20.00
08-Feb-28 End of February Expenses:Books $20.00 $40.00
08-Mar-01 Budget transaction Expenses:Books $-10.00 $30.00
08-Mar-01 March Expenses:Books $30.00 $60.00
08-Mar-31 End of March Expenses:Books $30.00 $90.00
08-Apr-01 Budget transaction Expenses:Books $-10.00 $80.00
08-Apr-01 April Expenses:Books $40.00 $120.00
08-Apr-30 End of April Expenses:Books $40.00 $160.00
08-May-01 Budget transaction Expenses:Books $-10.00 $150.00
08-May-01 May Expenses:Books $50.00 $200.00
08-May-31 End of May Expenses:Books $50.00 $250.00
08-Jun-01 Budget transaction Expenses:Books $-10.00 $240.00
08-Jun-01 June Expenses:Books $60.00 $300.00
08-Jun-30 End of June Expenses:Books $60.00 $360.00
08-Jul-01 Budget transaction Expenses:Books $-10.00 $350.00
08-Jul-01 July Expenses:Books $70.00 $420.00
08-Jul-31 End of July Expenses:Books $70.00 $490.00
08-Aug-01 Budget transaction Expenses:Books $-10.00 $480.00
08-Aug-01 August Expenses:Books $80.00 $560.00
08-Aug-31 End of August Expenses:Books $80.00 $640.00
08-Sep-01 Budget transaction Expenses:Books $-10.00 $630.00
08-Sep-01 September Expenses:Books $90.00 $720.00
08-Sep-30 End of September Expenses:Books $90.00 $810.00
08-Oct-01 Budget transaction Expenses:Books $-10.00 $800.00
08-Oct-01 October Expenses:Books $100.00 $900.00
08-Oct-31 End of October Expenses:Books $100.00 $1000.00
08-Nov-01 Budget transaction Expenses:Books $-10.00 $990.00
08-Nov-01 November Expenses:Books $110.00 $1100.00
08-Nov-30 End of November Expenses:Books $110.00 $1210.00
08-Dec-01 Budget transaction Expenses:Books $-10.00 $1200.00
08-Dec-01 December Expenses:Books $120.00 $1320.00
08-Dec-31 End of December Expenses:Books $120.00 $1440.00
09-Jan-01 Budget transaction Expenses:Books $-10.00 $1430.00
09-Jan-01 January Expenses:Books $10.00 $1440.00
09-Jan-31 End of January Expenses:Books $10.00 $1450.00
09-Feb-01 Budget transaction Expenses:Books $-10.00 $1440.00
09-Feb-01 February Expenses:Books $20.00 $1460.00
09-Feb-28 End of February Expenses:Books $20.00 $1480.00
09-Mar-01 Budget transaction Expenses:Books $-10.00 $1470.00
09-Mar-01 March Expenses:Books $30.00 $1500.00
09-Mar-31 End of March Expenses:Books $30.00 $1530.00
09-Apr-01 Budget transaction Expenses:Books $-10.00 $1520.00
09-Apr-01 April Expenses:Books $40.00 $1560.00
09-Apr-30 End of April Expenses:Books $40.00 $1600.00
09-May-01 Budget transaction Expenses:Books $-10.00 $1590.00
09-May-01 May Expenses:Books $50.00 $1640.00
09-May-31 End of May Expenses:Books $50.00 $1690.00
09-Jun-01 Budget transaction Expenses:Books $-10.00 $1680.00
09-Jun-01 June Expenses:Books $60.00 $1740.00
09-Jun-30 End of June Expenses:Books $60.00 $1800.00
09-Jul-01 Budget transaction Expenses:Books $-10.00 $1790.00
09-Jul-01 July Expenses:Books $70.00 $1860.00
09-Jul-31 End of July Expenses:Books $70.00 $1930.00
09-Aug-01 Budget transaction Expenses:Books $-10.00 $1920.00
09-Aug-01 August Expenses:Books $80.00 $2000.00
09-Aug-31 End of August Expenses:Books $80.00 $2080.00
09-Sep-01 Budget transaction Expenses:Books $-10.00 $2070.00
09-Sep-01 September Expenses:Books $90.00 $2160.00
09-Sep-30 End of September Expenses:Books $90.00 $2250.00
09-Oct-01 Budget transaction Expenses:Books $-10.00 $2240.00
09-Oct-01 October Expenses:Books $100.00 $2340.00
09-Oct-31 End of October Expenses:Books $100.00 $2440.00
09-Nov-01 Budget transaction Expenses:Books $-10.00 $2430.00
09-Nov-01 November Expenses:Books $110.00 $2540.00
09-Nov-30 End of November Expenses:Books $110.00 $2650.00
09-Dec-01 Budget transaction Expenses:Books $-10.00 $2640.00
09-Dec-01 December Expenses:Books $120.00 $2760.00
09-Dec-31 End of December Expenses:Books $120.00 $2880.00
end test
#test reg --budget books --now=2009/12/31
#08-Jan-01 Budget transaction Expenses:Books $-10.00 $-10.00
#08-Jan-01 January Expenses:Books $10.00 0
#08-Jan-31 End of January Expenses:Books $10.00 $10.00
#08-Feb-01 Budget transaction Expenses:Books $-10.00 0
#08-Feb-01 February Expenses:Books $20.00 $20.00
#08-Feb-28 End of February Expenses:Books $20.00 $40.00
#08-Mar-01 Budget transaction Expenses:Books $-10.00 $30.00
#08-Mar-01 March Expenses:Books $30.00 $60.00
#08-Mar-31 End of March Expenses:Books $30.00 $90.00
#08-Apr-01 Budget transaction Expenses:Books $-10.00 $80.00
#08-Apr-01 April Expenses:Books $40.00 $120.00
#08-Apr-30 End of April Expenses:Books $40.00 $160.00
#08-May-01 Budget transaction Expenses:Books $-10.00 $150.00
#08-May-01 May Expenses:Books $50.00 $200.00
#08-May-31 End of May Expenses:Books $50.00 $250.00
#08-Jun-01 Budget transaction Expenses:Books $-10.00 $240.00
#08-Jun-01 June Expenses:Books $60.00 $300.00
#08-Jun-30 End of June Expenses:Books $60.00 $360.00
#08-Jul-01 Budget transaction Expenses:Books $-10.00 $350.00
#08-Jul-01 July Expenses:Books $70.00 $420.00
#08-Jul-31 End of July Expenses:Books $70.00 $490.00
#08-Aug-01 Budget transaction Expenses:Books $-10.00 $480.00
#08-Aug-01 August Expenses:Books $80.00 $560.00
#08-Aug-31 End of August Expenses:Books $80.00 $640.00
#08-Sep-01 Budget transaction Expenses:Books $-10.00 $630.00
#08-Sep-01 September Expenses:Books $90.00 $720.00
#08-Sep-30 End of September Expenses:Books $90.00 $810.00
#08-Oct-01 Budget transaction Expenses:Books $-10.00 $800.00
#08-Oct-01 October Expenses:Books $100.00 $900.00
#08-Oct-31 End of October Expenses:Books $100.00 $1000.00
#08-Nov-01 Budget transaction Expenses:Books $-10.00 $990.00
#08-Nov-01 November Expenses:Books $110.00 $1100.00
#08-Nov-30 End of November Expenses:Books $110.00 $1210.00
#08-Dec-01 Budget transaction Expenses:Books $-10.00 $1200.00
#08-Dec-01 December Expenses:Books $120.00 $1320.00
#08-Dec-31 End of December Expenses:Books $120.00 $1440.00
#09-Jan-01 Budget transaction Expenses:Books $-10.00 $1430.00
#09-Jan-01 January Expenses:Books $10.00 $1440.00
#09-Jan-31 End of January Expenses:Books $10.00 $1450.00
#09-Feb-01 Budget transaction Expenses:Books $-10.00 $1440.00
#09-Feb-01 February Expenses:Books $20.00 $1460.00
#09-Feb-28 End of February Expenses:Books $20.00 $1480.00
#09-Mar-01 Budget transaction Expenses:Books $-10.00 $1470.00
#09-Mar-01 March Expenses:Books $30.00 $1500.00
#09-Mar-31 End of March Expenses:Books $30.00 $1530.00
#09-Apr-01 Budget transaction Expenses:Books $-10.00 $1520.00
#09-Apr-01 April Expenses:Books $40.00 $1560.00
#09-Apr-30 End of April Expenses:Books $40.00 $1600.00
#09-May-01 Budget transaction Expenses:Books $-10.00 $1590.00
#09-May-01 May Expenses:Books $50.00 $1640.00
#09-May-31 End of May Expenses:Books $50.00 $1690.00
#09-Jun-01 Budget transaction Expenses:Books $-10.00 $1680.00
#09-Jun-01 June Expenses:Books $60.00 $1740.00
#09-Jun-30 End of June Expenses:Books $60.00 $1800.00
#09-Jul-01 Budget transaction Expenses:Books $-10.00 $1790.00
#09-Jul-01 July Expenses:Books $70.00 $1860.00
#09-Jul-31 End of July Expenses:Books $70.00 $1930.00
#09-Aug-01 Budget transaction Expenses:Books $-10.00 $1920.00
#09-Aug-01 August Expenses:Books $80.00 $2000.00
#09-Aug-31 End of August Expenses:Books $80.00 $2080.00
#09-Sep-01 Budget transaction Expenses:Books $-10.00 $2070.00
#09-Sep-01 September Expenses:Books $90.00 $2160.00
#09-Sep-30 End of September Expenses:Books $90.00 $2250.00
#09-Oct-01 Budget transaction Expenses:Books $-10.00 $2240.00
#09-Oct-01 October Expenses:Books $100.00 $2340.00
#09-Oct-31 End of October Expenses:Books $100.00 $2440.00
#09-Nov-01 Budget transaction Expenses:Books $-10.00 $2430.00
#09-Nov-01 November Expenses:Books $110.00 $2540.00
#09-Nov-30 End of November Expenses:Books $110.00 $2650.00
#09-Dec-01 Budget transaction Expenses:Books $-10.00 $2640.00
#09-Dec-01 December Expenses:Books $120.00 $2760.00
#09-Dec-31 End of December Expenses:Books $120.00 $2880.00
#end test
#

View File

@ -12,13 +12,14 @@
Expenses:Household $100.00
Assets:Bank:Checking
comment
$ hledger -f- check
test reg income --budget --now=2010/06/20
10-Jan-01 Budget transaction Income:Salary $2491.60 $2491.60
10-Feb-01 Budget transaction Income:Salary $2491.60 $4983.20
10-Mar-01 Budget transaction Income:Salary $2491.60 $7474.80
10-Apr-01 Budget transaction Income:Salary $2491.60 $9966.40
10-May-01 Budget transaction Income:Salary $2491.60 $12458.00
10-Jun-01 Budget transaction Income:Salary $2491.60 $14949.60
end test
#test reg income --budget --now=2010/06/20
#10-Jan-01 Budget transaction Income:Salary $2491.60 $2491.60
#10-Feb-01 Budget transaction Income:Salary $2491.60 $4983.20
#10-Mar-01 Budget transaction Income:Salary $2491.60 $7474.80
#10-Apr-01 Budget transaction Income:Salary $2491.60 $9966.40
#10-May-01 Budget transaction Income:Salary $2491.60 $12458.00
#10-Jun-01 Budget transaction Income:Salary $2491.60 $14949.60
#end test
#

View File

@ -22,92 +22,93 @@
Expenses:Food $5
Assets:Cash
comment
$ hledger -f- check
test reg --now=2010/02 --sort=date exp --budget
09-Jan-01 Budget transaction Expenses:Food $-101 $-101
09-Jan-01 Budget transaction Expenses:Movies $-21 $-122
09-Jan-01 Budget transaction Expenses:Food $-103 $-225
09-Jan-01 Budget transaction Expenses:Movies $-23 $-248
09-Feb-01 Budget transaction Expenses:Food $-101 $-349
09-Feb-01 Budget transaction Expenses:Movies $-21 $-370
09-Feb-01 Budget transaction Expenses:Food $-103 $-473
09-Feb-01 Budget transaction Expenses:Movies $-23 $-496
09-Mar-01 Budget transaction Expenses:Food $-101 $-597
09-Mar-01 Budget transaction Expenses:Movies $-21 $-618
09-Mar-01 Budget transaction Expenses:Food $-103 $-721
09-Mar-01 Budget transaction Expenses:Movies $-23 $-744
09-Apr-01 Budget transaction Expenses:Food $-101 $-845
09-Apr-01 Budget transaction Expenses:Movies $-21 $-866
09-Apr-01 Budget transaction Expenses:Food $-103 $-969
09-Apr-01 Budget transaction Expenses:Movies $-23 $-992
09-May-01 Budget transaction Expenses:Food $-101 $-1093
09-May-01 Budget transaction Expenses:Movies $-21 $-1114
09-May-01 Budget transaction Expenses:Food $-103 $-1217
09-May-01 Budget transaction Expenses:Movies $-23 $-1240
09-Jun-01 Budget transaction Expenses:Food $-100 $-1340
09-Jun-01 Budget transaction Expenses:Movies $-20 $-1360
09-Jun-01 Budget transaction Expenses:Food $-102 $-1462
09-Jun-01 Budget transaction Expenses:Movies $-22 $-1484
09-Jun-01 Budget transaction Expenses:Food $-101 $-1585
09-Jun-01 Budget transaction Expenses:Movies $-21 $-1606
09-Jun-01 Budget transaction Expenses:Food $-103 $-1709
09-Jun-01 Budget transaction Expenses:Movies $-23 $-1732
09-Jun-05 Grocery Expenses:Food $5 $-1727
09-Jul-01 Budget transaction Expenses:Food $-100 $-1827
09-Jul-01 Budget transaction Expenses:Movies $-20 $-1847
09-Jul-01 Budget transaction Expenses:Food $-101 $-1948
09-Jul-01 Budget transaction Expenses:Movies $-21 $-1969
09-Jul-01 Budget transaction Expenses:Food $-102 $-2071
09-Jul-01 Budget transaction Expenses:Movies $-22 $-2093
09-Jul-01 Budget transaction Expenses:Food $-103 $-2196
09-Jul-01 Budget transaction Expenses:Movies $-23 $-2219
09-Aug-01 Budget transaction Expenses:Food $-100 $-2319
09-Aug-01 Budget transaction Expenses:Movies $-20 $-2339
09-Aug-01 Budget transaction Expenses:Food $-101 $-2440
09-Aug-01 Budget transaction Expenses:Movies $-21 $-2461
09-Aug-01 Budget transaction Expenses:Food $-102 $-2563
09-Aug-01 Budget transaction Expenses:Movies $-22 $-2585
09-Aug-01 Budget transaction Expenses:Food $-103 $-2688
09-Aug-01 Budget transaction Expenses:Movies $-23 $-2711
09-Sep-01 Budget transaction Expenses:Food $-100 $-2811
09-Sep-01 Budget transaction Expenses:Movies $-20 $-2831
09-Sep-01 Budget transaction Expenses:Food $-101 $-2932
09-Sep-01 Budget transaction Expenses:Movies $-21 $-2953
09-Sep-01 Budget transaction Expenses:Food $-102 $-3055
09-Sep-01 Budget transaction Expenses:Movies $-22 $-3077
09-Sep-01 Budget transaction Expenses:Food $-103 $-3180
09-Sep-01 Budget transaction Expenses:Movies $-23 $-3203
09-Oct-01 Budget transaction Expenses:Food $-100 $-3303
09-Oct-01 Budget transaction Expenses:Movies $-20 $-3323
09-Oct-01 Budget transaction Expenses:Food $-101 $-3424
09-Oct-01 Budget transaction Expenses:Movies $-21 $-3445
09-Oct-01 Budget transaction Expenses:Food $-102 $-3547
09-Oct-01 Budget transaction Expenses:Movies $-22 $-3569
09-Oct-01 Budget transaction Expenses:Food $-103 $-3672
09-Oct-01 Budget transaction Expenses:Movies $-23 $-3695
09-Nov-01 Budget transaction Expenses:Food $-100 $-3795
09-Nov-01 Budget transaction Expenses:Movies $-20 $-3815
09-Nov-01 Budget transaction Expenses:Food $-101 $-3916
09-Nov-01 Budget transaction Expenses:Movies $-21 $-3937
09-Nov-01 Budget transaction Expenses:Food $-102 $-4039
09-Nov-01 Budget transaction Expenses:Movies $-22 $-4061
09-Nov-01 Budget transaction Expenses:Food $-103 $-4164
09-Nov-01 Budget transaction Expenses:Movies $-23 $-4187
09-Dec-01 Budget transaction Expenses:Food $-100 $-4287
09-Dec-01 Budget transaction Expenses:Movies $-20 $-4307
09-Dec-01 Budget transaction Expenses:Food $-101 $-4408
09-Dec-01 Budget transaction Expenses:Movies $-21 $-4429
09-Dec-01 Budget transaction Expenses:Food $-102 $-4531
09-Dec-01 Budget transaction Expenses:Movies $-22 $-4553
09-Dec-01 Budget transaction Expenses:Food $-103 $-4656
09-Dec-01 Budget transaction Expenses:Movies $-23 $-4679
10-Jan-01 Budget transaction Expenses:Food $-100 $-4779
10-Jan-01 Budget transaction Expenses:Movies $-20 $-4799
10-Jan-01 Budget transaction Expenses:Food $-101 $-4900
10-Jan-01 Budget transaction Expenses:Movies $-21 $-4921
10-Feb-01 Budget transaction Expenses:Food $-100 $-5021
10-Feb-01 Budget transaction Expenses:Movies $-20 $-5041
10-Feb-01 Budget transaction Expenses:Food $-101 $-5142
10-Feb-01 Budget transaction Expenses:Movies $-21 $-5163
end test
#test reg --now=2010/02 --sort=date exp --budget
#09-Jan-01 Budget transaction Expenses:Food $-101 $-101
#09-Jan-01 Budget transaction Expenses:Movies $-21 $-122
#09-Jan-01 Budget transaction Expenses:Food $-103 $-225
#09-Jan-01 Budget transaction Expenses:Movies $-23 $-248
#09-Feb-01 Budget transaction Expenses:Food $-101 $-349
#09-Feb-01 Budget transaction Expenses:Movies $-21 $-370
#09-Feb-01 Budget transaction Expenses:Food $-103 $-473
#09-Feb-01 Budget transaction Expenses:Movies $-23 $-496
#09-Mar-01 Budget transaction Expenses:Food $-101 $-597
#09-Mar-01 Budget transaction Expenses:Movies $-21 $-618
#09-Mar-01 Budget transaction Expenses:Food $-103 $-721
#09-Mar-01 Budget transaction Expenses:Movies $-23 $-744
#09-Apr-01 Budget transaction Expenses:Food $-101 $-845
#09-Apr-01 Budget transaction Expenses:Movies $-21 $-866
#09-Apr-01 Budget transaction Expenses:Food $-103 $-969
#09-Apr-01 Budget transaction Expenses:Movies $-23 $-992
#09-May-01 Budget transaction Expenses:Food $-101 $-1093
#09-May-01 Budget transaction Expenses:Movies $-21 $-1114
#09-May-01 Budget transaction Expenses:Food $-103 $-1217
#09-May-01 Budget transaction Expenses:Movies $-23 $-1240
#09-Jun-01 Budget transaction Expenses:Food $-100 $-1340
#09-Jun-01 Budget transaction Expenses:Movies $-20 $-1360
#09-Jun-01 Budget transaction Expenses:Food $-102 $-1462
#09-Jun-01 Budget transaction Expenses:Movies $-22 $-1484
#09-Jun-01 Budget transaction Expenses:Food $-101 $-1585
#09-Jun-01 Budget transaction Expenses:Movies $-21 $-1606
#09-Jun-01 Budget transaction Expenses:Food $-103 $-1709
#09-Jun-01 Budget transaction Expenses:Movies $-23 $-1732
#09-Jun-05 Grocery Expenses:Food $5 $-1727
#09-Jul-01 Budget transaction Expenses:Food $-100 $-1827
#09-Jul-01 Budget transaction Expenses:Movies $-20 $-1847
#09-Jul-01 Budget transaction Expenses:Food $-101 $-1948
#09-Jul-01 Budget transaction Expenses:Movies $-21 $-1969
#09-Jul-01 Budget transaction Expenses:Food $-102 $-2071
#09-Jul-01 Budget transaction Expenses:Movies $-22 $-2093
#09-Jul-01 Budget transaction Expenses:Food $-103 $-2196
#09-Jul-01 Budget transaction Expenses:Movies $-23 $-2219
#09-Aug-01 Budget transaction Expenses:Food $-100 $-2319
#09-Aug-01 Budget transaction Expenses:Movies $-20 $-2339
#09-Aug-01 Budget transaction Expenses:Food $-101 $-2440
#09-Aug-01 Budget transaction Expenses:Movies $-21 $-2461
#09-Aug-01 Budget transaction Expenses:Food $-102 $-2563
#09-Aug-01 Budget transaction Expenses:Movies $-22 $-2585
#09-Aug-01 Budget transaction Expenses:Food $-103 $-2688
#09-Aug-01 Budget transaction Expenses:Movies $-23 $-2711
#09-Sep-01 Budget transaction Expenses:Food $-100 $-2811
#09-Sep-01 Budget transaction Expenses:Movies $-20 $-2831
#09-Sep-01 Budget transaction Expenses:Food $-101 $-2932
#09-Sep-01 Budget transaction Expenses:Movies $-21 $-2953
#09-Sep-01 Budget transaction Expenses:Food $-102 $-3055
#09-Sep-01 Budget transaction Expenses:Movies $-22 $-3077
#09-Sep-01 Budget transaction Expenses:Food $-103 $-3180
#09-Sep-01 Budget transaction Expenses:Movies $-23 $-3203
#09-Oct-01 Budget transaction Expenses:Food $-100 $-3303
#09-Oct-01 Budget transaction Expenses:Movies $-20 $-3323
#09-Oct-01 Budget transaction Expenses:Food $-101 $-3424
#09-Oct-01 Budget transaction Expenses:Movies $-21 $-3445
#09-Oct-01 Budget transaction Expenses:Food $-102 $-3547
#09-Oct-01 Budget transaction Expenses:Movies $-22 $-3569
#09-Oct-01 Budget transaction Expenses:Food $-103 $-3672
#09-Oct-01 Budget transaction Expenses:Movies $-23 $-3695
#09-Nov-01 Budget transaction Expenses:Food $-100 $-3795
#09-Nov-01 Budget transaction Expenses:Movies $-20 $-3815
#09-Nov-01 Budget transaction Expenses:Food $-101 $-3916
#09-Nov-01 Budget transaction Expenses:Movies $-21 $-3937
#09-Nov-01 Budget transaction Expenses:Food $-102 $-4039
#09-Nov-01 Budget transaction Expenses:Movies $-22 $-4061
#09-Nov-01 Budget transaction Expenses:Food $-103 $-4164
#09-Nov-01 Budget transaction Expenses:Movies $-23 $-4187
#09-Dec-01 Budget transaction Expenses:Food $-100 $-4287
#09-Dec-01 Budget transaction Expenses:Movies $-20 $-4307
#09-Dec-01 Budget transaction Expenses:Food $-101 $-4408
#09-Dec-01 Budget transaction Expenses:Movies $-21 $-4429
#09-Dec-01 Budget transaction Expenses:Food $-102 $-4531
#09-Dec-01 Budget transaction Expenses:Movies $-22 $-4553
#09-Dec-01 Budget transaction Expenses:Food $-103 $-4656
#09-Dec-01 Budget transaction Expenses:Movies $-23 $-4679
#10-Jan-01 Budget transaction Expenses:Food $-100 $-4779
#10-Jan-01 Budget transaction Expenses:Movies $-20 $-4799
#10-Jan-01 Budget transaction Expenses:Food $-101 $-4900
#10-Jan-01 Budget transaction Expenses:Movies $-21 $-4921
#10-Feb-01 Budget transaction Expenses:Food $-100 $-5021
#10-Feb-01 Budget transaction Expenses:Movies $-20 $-5041
#10-Feb-01 Budget transaction Expenses:Food $-101 $-5142
#10-Feb-01 Budget transaction Expenses:Movies $-21 $-5163
#end test
#

View File

@ -190,31 +190,32 @@
Expenses:Books $120.00
Assets:Cash
comment
$ hledger -f- check
test reg --by-payee not @End
08-Apr-01 April Assets:Cash $-80.00 $-80.00
Expenses:Books $80.00 0
08-Aug-01 August Assets:Cash $-160.00 $-160.00
Expenses:Books $160.00 0
08-Dec-01 December Assets:Cash $-240.00 $-240.00
Expenses:Books $240.00 0
08-Feb-01 February Assets:Cash $-40.00 $-40.00
Expenses:Books $40.00 0
08-Jan-01 January Assets:Cash $-20.00 $-20.00
Expenses:Books $20.00 0
08-Jul-01 July Assets:Cash $-140.00 $-140.00
Expenses:Books $140.00 0
08-Jun-01 June Assets:Cash $-120.00 $-120.00
Expenses:Books $120.00 0
08-Mar-01 March Assets:Cash $-60.00 $-60.00
Expenses:Books $60.00 0
08-May-01 May Assets:Cash $-100.00 $-100.00
Expenses:Books $100.00 0
08-Nov-01 November Assets:Cash $-220.00 $-220.00
Expenses:Books $220.00 0
08-Oct-01 October Assets:Cash $-200.00 $-200.00
Expenses:Books $200.00 0
08-Sep-01 September Assets:Cash $-180.00 $-180.00
Expenses:Books $180.00 0
end test
#test reg --by-payee not @End
#08-Apr-01 April Assets:Cash $-80.00 $-80.00
# Expenses:Books $80.00 0
#08-Aug-01 August Assets:Cash $-160.00 $-160.00
# Expenses:Books $160.00 0
#08-Dec-01 December Assets:Cash $-240.00 $-240.00
# Expenses:Books $240.00 0
#08-Feb-01 February Assets:Cash $-40.00 $-40.00
# Expenses:Books $40.00 0
#08-Jan-01 January Assets:Cash $-20.00 $-20.00
# Expenses:Books $20.00 0
#08-Jul-01 July Assets:Cash $-140.00 $-140.00
# Expenses:Books $140.00 0
#08-Jun-01 June Assets:Cash $-120.00 $-120.00
# Expenses:Books $120.00 0
#08-Mar-01 March Assets:Cash $-60.00 $-60.00
# Expenses:Books $60.00 0
#08-May-01 May Assets:Cash $-100.00 $-100.00
# Expenses:Books $100.00 0
#08-Nov-01 November Assets:Cash $-220.00 $-220.00
# Expenses:Books $220.00 0
#08-Oct-01 October Assets:Cash $-200.00 $-200.00
# Expenses:Books $200.00 0
#08-Sep-01 September Assets:Cash $-180.00 $-180.00
# Expenses:Books $180.00 0
#end test
#

View File

@ -28,21 +28,22 @@ tag Payee
Expenses:Phone 10.00 EUR ; Payee: MobilePhone
Assets:Cash
comment
$ hledger -f- check
test bal --strict --check-payees
-40.00 EUR
-570.00 GBP Assets:Cash
40.00 EUR
570.00 GBP Expenses
30.00 EUR Food
10.00 EUR
20.00 GBP Phone
550.00 GBP Rent
--------------------
0
__ERROR__
Warning: "$FILE", line 17: Unknown payee 'Rent'
Warning: "$FILE", line 21: Unknown payee 'Food'
Warning: "$FILE", line 27: Unknown payee 'Food'
end test
#test bal --strict --check-payees
# -40.00 EUR
# -570.00 GBP Assets:Cash
# 40.00 EUR
# 570.00 GBP Expenses
# 30.00 EUR Food
# 10.00 EUR
# 20.00 GBP Phone
# 550.00 GBP Rent
#--------------------
# 0
#__ERROR__
#Warning: "$FILE", line 17: Unknown payee 'Rent'
#Warning: "$FILE", line 21: Unknown payee 'Food'
#Warning: "$FILE", line 27: Unknown payee 'Food'
#end test
#

View File

@ -1,22 +1,23 @@
comment
$ hledger -f- check
test cleared --file test/input/drewr3.dat --cleared-format "%-30(account) %15(get_at(total_expr, 0)) %15(get_at(total_expr, 1))\n%/"
Assets $ -3,804.00 $ 775.00
Assets:Checking $ 1,396.00 $ 775.00
Assets:Checking:Business $ 30.00 0
Assets:Savings $ -5,200.00 0
Equity:Opening Balances $ -1,000.00 $ -1,000.00
Expenses $ 6,654.00 $ 225.00
Expenses:Auto $ 5,500.00 0
Expenses:Books $ 20.00 0
Expenses:Escrow $ 300.00 0
Expenses:Food:Groceries $ 334.00 $ 225.00
Expenses:Interest:Mortgage $ 500.00 0
Income $ -2,030.00 0
Income:Salary $ -2,000.00 0
Income:Sales $ -30.00 0
Liabilities $ -63.60 0
Liabilities:MasterCard $ -20.00 0
Liabilities:Mortgage:Principal $ 200.00 0
Liabilities:Tithe $ -243.60 0
end test
#test cleared --file test/input/drewr3.dat --cleared-format "%-30(account) %15(get_at(total_expr, 0)) %15(get_at(total_expr, 1))\n%/"
#Assets $ -3,804.00 $ 775.00
#Assets:Checking $ 1,396.00 $ 775.00
#Assets:Checking:Business $ 30.00 0
#Assets:Savings $ -5,200.00 0
#Equity:Opening Balances $ -1,000.00 $ -1,000.00
#Expenses $ 6,654.00 $ 225.00
#Expenses:Auto $ 5,500.00 0
#Expenses:Books $ 20.00 0
#Expenses:Escrow $ 300.00 0
#Expenses:Food:Groceries $ 334.00 $ 225.00
#Expenses:Interest:Mortgage $ 500.00 0
#Income $ -2,030.00 0
#Income:Salary $ -2,000.00 0
#Income:Sales $ -30.00 0
#Liabilities $ -63.60 0
#Liabilities:MasterCard $ -20.00 0
#Liabilities:Mortgage:Principal $ 200.00 0
#Liabilities:Tithe $ -243.60 0
#end test
#

View File

@ -190,17 +190,18 @@
Expenses:Books $120.00
Assets:Cash
comment
$ hledger -f- check
test reg --cleared
08-Jan-01 January Expenses:Books $10.00 $10.00
Assets:Cash $-10.00 0
08-Feb-01 February Expenses:Books $20.00 $20.00
Assets:Cash $-20.00 0
08-Mar-01 March Expenses:Books $30.00 $30.00
Assets:Cash $-30.00 0
08-Apr-01 April Expenses:Books $40.00 $40.00
08-Apr-30 End of April Expenses:Books $40.00 $80.00
08-May-01 May Assets:Cash $-50.00 $30.00
08-May-31 End of May Assets:Cash $-50.00 $-20.00
end test
#test reg --cleared
#08-Jan-01 January Expenses:Books $10.00 $10.00
# Assets:Cash $-10.00 0
#08-Feb-01 February Expenses:Books $20.00 $20.00
# Assets:Cash $-20.00 0
#08-Mar-01 March Expenses:Books $30.00 $30.00
# Assets:Cash $-30.00 0
#08-Apr-01 April Expenses:Books $40.00 $40.00
#08-Apr-30 End of April Expenses:Books $40.00 $80.00
#08-May-01 May Assets:Cash $-50.00 $30.00
#08-May-31 End of May Assets:Cash $-50.00 $-20.00
#end test
#

View File

@ -18,17 +18,18 @@
Expenses:Books $30.00
Assets:Cash
comment
$ hledger -f- check
test reg --account=code
08-Jan-01 January 100:Expenses:Books $10.00 $10.00
08-Jan-01 January 100:Assets:Cash $-10.00 0
08-Jan-31 End of January 101:Expenses:Books $10.00 $10.00
08-Jan-31 End of January 101:Assets:Cash $-10.00 0
08-Feb-01 February 102:Expenses:Books $20.00 $20.00
08-Feb-01 February 102:Assets:Cash $-20.00 0
08-Feb-28 End of February 103:Expenses:Books $20.00 $20.00
08-Feb-28 End of February 103:Assets:Cash $-20.00 0
08-Mar-01 March Expenses:Books $30.00 $30.00
08-Mar-01 March Assets:Cash $-30.00 0
end test
#test reg --account=code
#08-Jan-01 January 100:Expenses:Books $10.00 $10.00
#08-Jan-01 January 100:Assets:Cash $-10.00 0
#08-Jan-31 End of January 101:Expenses:Books $10.00 $10.00
#08-Jan-31 End of January 101:Assets:Cash $-10.00 0
#08-Feb-01 February 102:Expenses:Books $20.00 $20.00
#08-Feb-01 February 102:Assets:Cash $-20.00 0
#08-Feb-28 End of February 103:Expenses:Books $20.00 $20.00
#08-Feb-28 End of February 103:Assets:Cash $-20.00 0
#08-Mar-01 March Expenses:Books $30.00 $30.00
#08-Mar-01 March Assets:Cash $-30.00 0
#end test
#

View File

@ -18,17 +18,18 @@
Expenses:Books $30.00
Assets:Cash
comment
$ hledger -f- check
test reg --payee=code
08-Jan-01 100 Expenses:Books $10.00 $10.00
08-Jan-01 100 Assets:Cash $-10.00 0
08-Jan-31 101 Expenses:Books $10.00 $10.00
08-Jan-31 101 Assets:Cash $-10.00 0
08-Feb-01 102 Expenses:Books $20.00 $20.00
08-Feb-01 102 Assets:Cash $-20.00 0
08-Feb-28 103 Expenses:Books $20.00 $20.00
08-Feb-28 103 Assets:Cash $-20.00 0
08-Mar-01 March Expenses:Books $30.00 $30.00
08-Mar-01 March Assets:Cash $-30.00 0
end test
#test reg --payee=code
#08-Jan-01 100 Expenses:Books $10.00 $10.00
#08-Jan-01 100 Assets:Cash $-10.00 0
#08-Jan-31 101 Expenses:Books $10.00 $10.00
#08-Jan-31 101 Assets:Cash $-10.00 0
#08-Feb-01 102 Expenses:Books $20.00 $20.00
#08-Feb-01 102 Assets:Cash $-20.00 0
#08-Feb-28 103 Expenses:Books $20.00 $20.00
#08-Feb-28 103 Assets:Cash $-20.00 0
#08-Mar-01 March Expenses:Books $30.00 $30.00
#08-Mar-01 March Assets:Cash $-30.00 0
#end test
#

View File

@ -6,10 +6,11 @@
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
$ hledger -f- check
test reg --collapse-if-zero
07-Feb-02 RD VMMXX As:Inves:Vanguar:VMMXX 0.350 VMMXX 0.350 VMMXX
In:Divid:Vanguar:VMMXX $-0.35 $-0.35
0.350 VMMXX
end test
#test reg --collapse-if-zero
#07-Feb-02 RD VMMXX As:Inves:Vanguar:VMMXX 0.350 VMMXX 0.350 VMMXX
# In:Divid:Vanguar:VMMXX $-0.35 $-0.35
# 0.350 VMMXX
#end test
#

View File

@ -2,12 +2,13 @@
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
$ hledger -f- check
test bal --collapse
0.350 VMMXX Assets
$-0.35 Income
--------------------
$-0.35
0.350 VMMXX
end test
#test bal --collapse
# 0.350 VMMXX Assets
# $-0.35 Income
#--------------------
# $-0.35
# 0.350 VMMXX
#end test
#

View File

@ -33,14 +33,15 @@
Expenses:Food:Tips $1
Assets:Cash
comment
$ hledger -f- check
test reg --collapse food
09-Oct-01 Test <Total> $11 $11
09-Oct-02 Test <Total> $11 $22
09-Oct-03 Test <Total> $11 $33
09-Oct-04 Test <Total> $11 $44
09-Oct-05 Test <Total> $11 $55
09-Oct-06 Test <Total> $11 $66
09-Oct-07 Test <Total> $11 $77
end test
#test reg --collapse food
#09-Oct-01 Test <Total> $11 $11
#09-Oct-02 Test <Total> $11 $22
#09-Oct-03 Test <Total> $11 $33
#09-Oct-04 Test <Total> $11 $44
#09-Oct-05 Test <Total> $11 $55
#09-Oct-06 Test <Total> $11 $66
#09-Oct-07 Test <Total> $11 $77
#end test
#

View File

@ -2,12 +2,13 @@
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
$ hledger -f- check
test bal --color
0.350 VMMXX Assets:Investments:Vanguard:VMMXX
$-0.35 Income:Dividends:Vanguard:VMMXX
--------------------
$-0.35
0.350 VMMXX
end test
#test bal --color
# 0.350 VMMXX Assets:Investments:Vanguard:VMMXX
# $-0.35 Income:Dividends:Vanguard:VMMXX
#--------------------
# $-0.35
# 0.350 VMMXX
#end test
#

View File

@ -2,10 +2,11 @@
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
$ hledger -f- check
test reg --columns=100
07-Feb-02 RD VMMXX Asse:Investment:Vanguard:VMMXX 0.350 VMMXX 0.350 VMMXX
Incom:Dividends:Vanguard:VMMXX $-0.35 $-0.35
0.350 VMMXX
end test
#test reg --columns=100
#07-Feb-02 RD VMMXX Asse:Investment:Vanguard:VMMXX 0.350 VMMXX 0.350 VMMXX
# Incom:Dividends:Vanguard:VMMXX $-0.35 $-0.35
# 0.350 VMMXX
#end test
#

View File

@ -2,10 +2,11 @@
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
$ hledger -f- check
test reg --account=commodity
07-Feb-02 RD VMMXX VM:As:Inv:Vangua:VMMXX 0.350 VMMXX 0.350 VMMXX
07-Feb-02 RD VMMXX $:In:Div:Vanguar:VMMXX $-0.35 $-0.35
0.350 VMMXX
end test
#test reg --account=commodity
#07-Feb-02 RD VMMXX VM:As:Inv:Vangua:VMMXX 0.350 VMMXX 0.350 VMMXX
#07-Feb-02 RD VMMXX $:In:Div:Vanguar:VMMXX $-0.35 $-0.35
# 0.350 VMMXX
#end test
#

View File

@ -2,10 +2,11 @@
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
$ hledger -f- check
test reg --payee=commodity
07-Feb-02 VMMXX As:Inves:Vanguar:VMMXX 0.350 VMMXX 0.350 VMMXX
07-Feb-02 $ In:Divid:Vanguar:VMMXX $-0.35 $-0.35
0.350 VMMXX
end test
#test reg --payee=commodity
#07-Feb-02 VMMXX As:Inves:Vanguar:VMMXX 0.350 VMMXX 0.350 VMMXX
#07-Feb-02 $ In:Divid:Vanguar:VMMXX $-0.35 $-0.35
# 0.350 VMMXX
#end test
#

View File

@ -2,11 +2,12 @@
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
$ hledger -f- check
test bal --cost
$0.35 Assets:Investments:Vanguard:VMMXX
$-0.35 Income:Dividends:Vanguard:VMMXX
--------------------
0
end test
#test bal --cost
# $0.35 Assets:Investments:Vanguard:VMMXX
# $-0.35 Income:Dividends:Vanguard:VMMXX
#--------------------
# 0
#end test
#

View File

@ -16,30 +16,31 @@
Expenses:Rent 30.00 EUR
Assets:Cash -30.00 EUR
comment
test accounts --count
4 Assets:Cash
2 Expenses:Phone
2 Expenses:Rent
end test
test commodities --count
4 EUR
4 GBP
end test
test payees --count
4 Phone expense
4 Rent expense
end test
test commodities :rent --count
1 EUR
1 GBP
end test
test payees tag bnb --count
2 Rent expense
end test
$ hledger -f- check
#test accounts --count
#4 Assets:Cash
#2 Expenses:Phone
#2 Expenses:Rent
#end test
#
#test commodities --count
#4 EUR
#4 GBP
#end test
#
#test payees --count
#4 Phone expense
#4 Rent expense
#end test
#
#test commodities :rent --count
#1 EUR
#1 GBP
#end test
#
#test payees tag bnb --count
#2 Rent expense
#end test
#
#

View File

@ -2,9 +2,10 @@
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
$ hledger -f- check
test csv --csv-format='"%(date)"\n'
"2007/02/02"
"2007/02/02"
end test
#test csv --csv-format='"%(date)"\n'
#"2007/02/02"
#"2007/02/02"
#end test
#

View File

@ -6,12 +6,13 @@
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
$ hledger -f- check
test bal --current
0.350 VMMXX Assets:Investments:Vanguard:VMMXX
$-0.35 Income:Dividends:Vanguard:VMMXX
--------------------
$-0.35
0.350 VMMXX
end test
#test bal --current
# 0.350 VMMXX Assets:Investments:Vanguard:VMMXX
# $-0.35 Income:Dividends:Vanguard:VMMXX
#--------------------
# $-0.35
# 0.350 VMMXX
#end test
#

View File

@ -46,11 +46,12 @@
Expenses:Books $20.00
Assets:Cash
comment
$ hledger -f- check
test reg --daily
08-Jan-01 - 08-Jan-01 Assets:Cash $-60.00 $-60.00
Expenses:Books $60.00 0
08-Feb-01 - 08-Feb-01 Assets:Cash $-120.00 $-120.00
Expenses:Books $120.00 0
end test
#test reg --daily
#08-Jan-01 - 08-Jan-01 Assets:Cash $-60.00 $-60.00
# Expenses:Books $60.00 0
#08-Feb-01 - 08-Feb-01 Assets:Cash $-120.00 $-120.00
# Expenses:Books $120.00 0
#end test
#

View File

@ -2,10 +2,11 @@
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
$ hledger -f- check
test reg --date-format='%Y'
2007 RD VMMXX As:Investm:Vanguar:VMMXX 0.350 VMMXX 0.350 VMMXX
In:Dividen:Vanguar:VMMXX $-0.35 $-0.35
0.350 VMMXX
end test
#test reg --date-format='%Y'
#2007 RD VMMXX As:Investm:Vanguar:VMMXX 0.350 VMMXX 0.350 VMMXX
# In:Dividen:Vanguar:VMMXX $-0.35 $-0.35
# 0.350 VMMXX
#end test
#

View File

@ -2,10 +2,11 @@
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
$ hledger -f- check
test reg --date-width=20
07-Feb-02 RD VMMXX As:Investm:Vanguar:VMMXX 0.350 VMMXX 0.350 VMMXX
In:Dividen:Vanguar:VMMXX $-0.35 $-0.35
0.350 VMMXX
end test
#test reg --date-width=20
#07-Feb-02 RD VMMXX As:Investm:Vanguar:VMMXX 0.350 VMMXX 0.350 VMMXX
# In:Dividen:Vanguar:VMMXX $-0.35 $-0.35
# 0.350 VMMXX
#end test
#

View File

@ -8,45 +8,46 @@ D 1000.00 GBP
Assets:Broker 2 AAA @ 1.00 GBP
Assets:Bank
comment
test reg --input-date-format %Y-%m-%d --date-format %d-%m-%Y --date 'has_tag("date") ? to_date(tag("date")) : date'
05-04-2011 Buy shares Assets:Broker 2 AAA 2 AAA
05-04-2011 Buy shares Assets:Bank -1.80 GBP 2 AAA
-1.80 GBP
06-04-2011 Buy shares Assets:Broker 2 AAA 4 AAA
-1.80 GBP
06-04-2011 Buy shares Assets:Bank -2.00 GBP 4 AAA
-3.80 GBP
end test
test reg --date 'date + 2'
11-Mar-06 Buy shares Assets:Broker 2 AAA 2 AAA
11-Mar-06 Buy shares Assets:Bank -1.80 GBP 2 AAA
-1.80 GBP
11-Mar-07 Buy shares Assets:Broker 2 AAA 4 AAA
-1.80 GBP
11-Mar-07 Buy shares Assets:Bank -2.00 GBP 4 AAA
-3.80 GBP
end test
test reg --date 'date - 2'
11-Mar-02 Buy shares Assets:Broker 2 AAA 2 AAA
11-Mar-02 Buy shares Assets:Bank -1.80 GBP 2 AAA
-1.80 GBP
11-Mar-03 Buy shares Assets:Broker 2 AAA 4 AAA
-1.80 GBP
11-Mar-03 Buy shares Assets:Bank -2.00 GBP 4 AAA
-3.80 GBP
end test
test reg --date 'date + 365*2'
13-Mar-03 Buy shares Assets:Broker 2 AAA 2 AAA
13-Mar-03 Buy shares Assets:Bank -1.80 GBP 2 AAA
-1.80 GBP
13-Mar-04 Buy shares Assets:Broker 2 AAA 4 AAA
-1.80 GBP
13-Mar-04 Buy shares Assets:Bank -2.00 GBP 4 AAA
-3.80 GBP
end test
$ hledger -f- check
#test reg --input-date-format %Y-%m-%d --date-format %d-%m-%Y --date 'has_tag("date") ? to_date(tag("date")) : date'
#05-04-2011 Buy shares Assets:Broker 2 AAA 2 AAA
#05-04-2011 Buy shares Assets:Bank -1.80 GBP 2 AAA
# -1.80 GBP
#06-04-2011 Buy shares Assets:Broker 2 AAA 4 AAA
# -1.80 GBP
#06-04-2011 Buy shares Assets:Bank -2.00 GBP 4 AAA
# -3.80 GBP
#end test
#
#test reg --date 'date + 2'
#11-Mar-06 Buy shares Assets:Broker 2 AAA 2 AAA
#11-Mar-06 Buy shares Assets:Bank -1.80 GBP 2 AAA
# -1.80 GBP
#11-Mar-07 Buy shares Assets:Broker 2 AAA 4 AAA
# -1.80 GBP
#11-Mar-07 Buy shares Assets:Bank -2.00 GBP 4 AAA
# -3.80 GBP
#end test
#
#test reg --date 'date - 2'
#11-Mar-02 Buy shares Assets:Broker 2 AAA 2 AAA
#11-Mar-02 Buy shares Assets:Bank -1.80 GBP 2 AAA
# -1.80 GBP
#11-Mar-03 Buy shares Assets:Broker 2 AAA 4 AAA
# -1.80 GBP
#11-Mar-03 Buy shares Assets:Bank -2.00 GBP 4 AAA
# -3.80 GBP
#end test
#
#test reg --date 'date + 365*2'
#13-Mar-03 Buy shares Assets:Broker 2 AAA 2 AAA
#13-Mar-03 Buy shares Assets:Bank -1.80 GBP 2 AAA
# -1.80 GBP
#13-Mar-04 Buy shares Assets:Broker 2 AAA 4 AAA
# -1.80 GBP
#13-Mar-04 Buy shares Assets:Bank -2.00 GBP 4 AAA
# -3.80 GBP
#end test
#
#

View File

@ -9,16 +9,17 @@ o 2013/04/05 12:00:00
i 2013/04/05 12:00:00 Personal:Lunch
o 2013/04/05 13:30:00
comment
test bal --time-report --datetime-format '%m/%d/%y %I:%M %p'
04/05/13 10:00 AM 04/05/13 10:05 AM 5.0m CustomerA:Email
04/05/13 10:05 AM 04/05/13 11:30 AM 1.42h CustomerB:Config
04/05/13 09:30 AM 04/05/13 10:00 AM 30.0m Internal:Meeting:Tactical
2.00h Personal
04/05/13 12:00 PM 04/05/13 01:30 PM 1.50h Lunch
04/05/13 11:30 AM 04/05/13 12:00 PM 30.0m Walk
--------------------------------------------------
end test
$ hledger -f- check
#test bal --time-report --datetime-format '%m/%d/%y %I:%M %p'
# 04/05/13 10:00 AM 04/05/13 10:05 AM 5.0m CustomerA:Email
# 04/05/13 10:05 AM 04/05/13 11:30 AM 1.42h CustomerB:Config
# 04/05/13 09:30 AM 04/05/13 10:00 AM 30.0m Internal:Meeting:Tactical
# 2.00h Personal
# 04/05/13 12:00 PM 04/05/13 01:30 PM 1.50h Lunch
# 04/05/13 11:30 AM 04/05/13 12:00 PM 30.0m Walk
#--------------------------------------------------
#
#end test
#
#

View File

@ -1,14 +1,15 @@
i 05/10/2011 08:58:37 682
o 05/12/2011 11:25:21
comment
$ hledger -f- check
test reg --base
11-May-10 (682) 181604s 181604s
end test
test reg --base --day-break
11-May-10 (682) 54083s 54083s
11-May-11 (682) 86400s 140483s
11-May-12 (682) 41121s 181604s
end test
#test reg --base
#11-May-10 (682) 181604s 181604s
#end test
#
#test reg --base --day-break
#11-May-10 (682) 54083s 54083s
#11-May-11 (682) 86400s 140483s
#11-May-12 (682) 41121s 181604s
#end test
#

View File

@ -15,26 +15,27 @@
Expenses:Food $-5
Assets:Cash
comment
test reg --dc
12-Mar-10 Employer Assets:Cash $100 0 $100
Incom:Employer 0 $100 0
12-Mar-10 KFC Expenses:Food $20 0 $20
Assets:Cash 0 $20 0
12-Mar-10 KFC - Rebate Assets:Cash $5 0 $5
Expenses:Food 0 $5 0
12-Mar-10 KFC - Food & R.. Expenses:Food $20 0 $20
Expenses:Food 0 $5 $15
Assets:Cash 0 $15 0
end test
test bal --dc
$105 $35 $70 Assets:Cash
$40 $10 $30 Expenses:Food
0 $100 $-100 Income:Employer
--------------------------------------------
$145 $145 0
end test
$ hledger -f- check
#test reg --dc
#12-Mar-10 Employer Assets:Cash $100 0 $100
# Incom:Employer 0 $100 0
#12-Mar-10 KFC Expenses:Food $20 0 $20
# Assets:Cash 0 $20 0
#12-Mar-10 KFC - Rebate Assets:Cash $5 0 $5
# Expenses:Food 0 $5 0
#12-Mar-10 KFC - Food & R.. Expenses:Food $20 0 $20
# Expenses:Food 0 $5 $15
# Assets:Cash 0 $15 0
#end test
#
#test bal --dc
# $105 $35 $70 Assets:Cash
# $40 $10 $30 Expenses:Food
# 0 $100 $-100 Income:Employer
#--------------------------------------------
# $145 $145 0
#end test
#
#
#

View File

@ -10,15 +10,16 @@
Expenses:Food €10,00
Assets:Cash €-10,00
comment
test --decimal-comma bal
90,00 EUR
€-10,00 Assets:Cash
-100,00 EUR Equity:Opening Balance
10,00 EUR
€10,00 Expenses:Food
--------------------
0
end test
$ hledger -f- check
#test --decimal-comma bal
# 90,00 EUR
# €-10,00 Assets:Cash
# -100,00 EUR Equity:Opening Balance
# 10,00 EUR
# €10,00 Expenses:Food
#--------------------
# 0
#end test
#
#

View File

@ -18,72 +18,73 @@
Income:One:Two:Books $-10.00
Income:One:Two:Three:Books $-10.00
comment
$ hledger -f- check
test bal --depth 1
$-10.00 Assets
$40.00 Expenses
$-30.00 Income
--------------------
0
end test
test bal --depth 2
$-10.00 Assets:Cash
$40.00 Expenses
$10.00 Books
$30.00 One
$-30.00 Income:One
--------------------
0
end test
test bal --depth 3
$-10.00 Assets:Cash
$40.00 Expenses
$10.00 Books
$30.00 One
$10.00 Books
$20.00 Two
$-30.00 Income:One
$-10.00 Books
$-20.00 Two
--------------------
0
end test
test bal --depth 4
$-10.00 Assets:Cash
$40.00 Expenses
$10.00 Books
$30.00 One
$10.00 Books
$20.00 Two
$10.00 Books
$10.00 Three
$-30.00 Income:One
$-10.00 Books
$-20.00 Two
$-10.00 Books
$-10.00 Three
--------------------
0
end test
test bal --depth 5
$-10.00 Assets:Cash
$40.00 Expenses
$10.00 Books
$30.00 One
$10.00 Books
$20.00 Two
$10.00 Books
$10.00 Three:Books
$-30.00 Income:One
$-10.00 Books
$-20.00 Two
$-10.00 Books
$-10.00 Three:Books
--------------------
0
end test
#test bal --depth 1
# $-10.00 Assets
# $40.00 Expenses
# $-30.00 Income
#--------------------
# 0
#end test
#
#test bal --depth 2
# $-10.00 Assets:Cash
# $40.00 Expenses
# $10.00 Books
# $30.00 One
# $-30.00 Income:One
#--------------------
# 0
#end test
#
#test bal --depth 3
# $-10.00 Assets:Cash
# $40.00 Expenses
# $10.00 Books
# $30.00 One
# $10.00 Books
# $20.00 Two
# $-30.00 Income:One
# $-10.00 Books
# $-20.00 Two
#--------------------
# 0
#end test
#
#test bal --depth 4
# $-10.00 Assets:Cash
# $40.00 Expenses
# $10.00 Books
# $30.00 One
# $10.00 Books
# $20.00 Two
# $10.00 Books
# $10.00 Three
# $-30.00 Income:One
# $-10.00 Books
# $-20.00 Two
# $-10.00 Books
# $-10.00 Three
#--------------------
# 0
#end test
#
#test bal --depth 5
# $-10.00 Assets:Cash
# $40.00 Expenses
# $10.00 Books
# $30.00 One
# $10.00 Books
# $20.00 Two
# $10.00 Books
# $10.00 Three:Books
# $-30.00 Income:One
# $-10.00 Books
# $-20.00 Two
# $-10.00 Books
# $-10.00 Three:Books
#--------------------
# 0
#end test
#

View File

@ -18,47 +18,48 @@
Income:One:Two:Books $-10.00
Income:One:Two:Three:Books $-10.00
comment
$ hledger -f- check
test bal --depth 1 --flat
end test
test bal --depth 2 --flat
$-10.00 Assets:Cash
$10.00 Expenses:Books
--------------------
0
end test
test bal --depth 3 --flat
$-10.00 Assets:Cash
$10.00 Expenses:Books
$10.00 Expenses:One:Books
$-10.00 Income:One:Books
--------------------
0
end test
test bal --depth 4 --flat
$-10.00 Assets:Cash
$10.00 Expenses:Books
$10.00 Expenses:One:Books
$10.00 Expenses:One:Two:Books
$-10.00 Income:One:Books
$-10.00 Income:One:Two:Books
--------------------
0
end test
test bal --depth 5 --flat
$-10.00 Assets:Cash
$10.00 Expenses:Books
$10.00 Expenses:One:Books
$10.00 Expenses:One:Two:Books
$10.00 Expenses:One:Two:Three:Books
$-10.00 Income:One:Books
$-10.00 Income:One:Two:Books
$-10.00 Income:One:Two:Three:Books
--------------------
0
end test
#test bal --depth 1 --flat
#end test
#
#test bal --depth 2 --flat
# $-10.00 Assets:Cash
# $10.00 Expenses:Books
#--------------------
# 0
#end test
#
#test bal --depth 3 --flat
# $-10.00 Assets:Cash
# $10.00 Expenses:Books
# $10.00 Expenses:One:Books
# $-10.00 Income:One:Books
#--------------------
# 0
#end test
#
#test bal --depth 4 --flat
# $-10.00 Assets:Cash
# $10.00 Expenses:Books
# $10.00 Expenses:One:Books
# $10.00 Expenses:One:Two:Books
# $-10.00 Income:One:Books
# $-10.00 Income:One:Two:Books
#--------------------
# 0
#end test
#
#test bal --depth 5 --flat
# $-10.00 Assets:Cash
# $10.00 Expenses:Books
# $10.00 Expenses:One:Books
# $10.00 Expenses:One:Two:Books
# $10.00 Expenses:One:Two:Three:Books
# $-10.00 Income:One:Books
# $-10.00 Income:One:Two:Books
# $-10.00 Income:One:Two:Three:Books
#--------------------
# 0
#end test
#

View File

@ -190,55 +190,56 @@
Expenses:Books $120.00
Assets:Cash
comment
$ hledger -f- check
test reg -A --deviation books
08-Jan-01 January Expenses:Books $10.00 0
08-Jan-31 End of January Expenses:Books $10.00 0
08-Feb-01 February Expenses:Books $20.00 $6.67
08-Feb-28 End of February Expenses:Books $20.00 $5.00
08-Mar-01 March Expenses:Books $30.00 $12.00
08-Mar-31 End of March Expenses:Books $30.00 $10.00
08-Apr-01 April Expenses:Books $40.00 $17.14
08-Apr-30 End of April Expenses:Books $40.00 $15.00
08-May-01 May Expenses:Books $50.00 $22.22
08-May-31 End of May Expenses:Books $50.00 $20.00
08-Jun-01 June Expenses:Books $60.00 $27.27
08-Jun-30 End of June Expenses:Books $60.00 $25.00
08-Jul-01 July Expenses:Books $70.00 $32.31
08-Jul-31 End of July Expenses:Books $70.00 $30.00
08-Aug-01 August Expenses:Books $80.00 $37.33
08-Aug-31 End of August Expenses:Books $80.00 $35.00
08-Sep-01 September Expenses:Books $90.00 $42.35
08-Sep-30 End of September Expenses:Books $90.00 $40.00
08-Oct-01 October Expenses:Books $100.00 $47.37
08-Oct-31 End of October Expenses:Books $100.00 $45.00
08-Nov-01 November Expenses:Books $110.00 $52.38
08-Nov-30 End of November Expenses:Books $110.00 $50.00
08-Dec-01 December Expenses:Books $120.00 $57.39
08-Dec-31 End of December Expenses:Books $120.00 $55.00
09-Jan-01 January Expenses:Books $10.00 $-52.80
09-Jan-31 End of January Expenses:Books $10.00 $-50.77
09-Feb-01 February Expenses:Books $20.00 $-39.26
09-Feb-28 End of February Expenses:Books $20.00 $-37.86
09-Mar-01 March Expenses:Books $30.00 $-26.90
09-Mar-31 End of March Expenses:Books $30.00 $-26.00
09-Apr-01 April Expenses:Books $40.00 $-15.48
09-Apr-30 End of April Expenses:Books $40.00 $-15.00
09-May-01 May Expenses:Books $50.00 $-4.85
09-May-31 End of May Expenses:Books $50.00 $-4.71
09-Jun-01 June Expenses:Books $60.00 $5.14
09-Jun-30 End of June Expenses:Books $60.00 $5.00
09-Jul-01 July Expenses:Books $70.00 $14.59
09-Jul-31 End of July Expenses:Books $70.00 $14.21
09-Aug-01 August Expenses:Books $80.00 $23.59
09-Aug-31 End of August Expenses:Books $80.00 $23.00
09-Sep-01 September Expenses:Books $90.00 $32.20
09-Sep-30 End of September Expenses:Books $90.00 $31.43
09-Oct-01 October Expenses:Books $100.00 $40.47
09-Oct-31 End of October Expenses:Books $100.00 $39.55
09-Nov-01 November Expenses:Books $110.00 $48.44
09-Nov-30 End of November Expenses:Books $110.00 $47.39
09-Dec-01 December Expenses:Books $120.00 $56.17
09-Dec-31 End of December Expenses:Books $120.00 $55.00
end test
#test reg -A --deviation books
#08-Jan-01 January Expenses:Books $10.00 0
#08-Jan-31 End of January Expenses:Books $10.00 0
#08-Feb-01 February Expenses:Books $20.00 $6.67
#08-Feb-28 End of February Expenses:Books $20.00 $5.00
#08-Mar-01 March Expenses:Books $30.00 $12.00
#08-Mar-31 End of March Expenses:Books $30.00 $10.00
#08-Apr-01 April Expenses:Books $40.00 $17.14
#08-Apr-30 End of April Expenses:Books $40.00 $15.00
#08-May-01 May Expenses:Books $50.00 $22.22
#08-May-31 End of May Expenses:Books $50.00 $20.00
#08-Jun-01 June Expenses:Books $60.00 $27.27
#08-Jun-30 End of June Expenses:Books $60.00 $25.00
#08-Jul-01 July Expenses:Books $70.00 $32.31
#08-Jul-31 End of July Expenses:Books $70.00 $30.00
#08-Aug-01 August Expenses:Books $80.00 $37.33
#08-Aug-31 End of August Expenses:Books $80.00 $35.00
#08-Sep-01 September Expenses:Books $90.00 $42.35
#08-Sep-30 End of September Expenses:Books $90.00 $40.00
#08-Oct-01 October Expenses:Books $100.00 $47.37
#08-Oct-31 End of October Expenses:Books $100.00 $45.00
#08-Nov-01 November Expenses:Books $110.00 $52.38
#08-Nov-30 End of November Expenses:Books $110.00 $50.00
#08-Dec-01 December Expenses:Books $120.00 $57.39
#08-Dec-31 End of December Expenses:Books $120.00 $55.00
#09-Jan-01 January Expenses:Books $10.00 $-52.80
#09-Jan-31 End of January Expenses:Books $10.00 $-50.77
#09-Feb-01 February Expenses:Books $20.00 $-39.26
#09-Feb-28 End of February Expenses:Books $20.00 $-37.86
#09-Mar-01 March Expenses:Books $30.00 $-26.90
#09-Mar-31 End of March Expenses:Books $30.00 $-26.00
#09-Apr-01 April Expenses:Books $40.00 $-15.48
#09-Apr-30 End of April Expenses:Books $40.00 $-15.00
#09-May-01 May Expenses:Books $50.00 $-4.85
#09-May-31 End of May Expenses:Books $50.00 $-4.71
#09-Jun-01 June Expenses:Books $60.00 $5.14
#09-Jun-30 End of June Expenses:Books $60.00 $5.00
#09-Jul-01 July Expenses:Books $70.00 $14.59
#09-Jul-31 End of July Expenses:Books $70.00 $14.21
#09-Aug-01 August Expenses:Books $80.00 $23.59
#09-Aug-31 End of August Expenses:Books $80.00 $23.00
#09-Sep-01 September Expenses:Books $90.00 $32.20
#09-Sep-30 End of September Expenses:Books $90.00 $31.43
#09-Oct-01 October Expenses:Books $100.00 $40.47
#09-Oct-31 End of October Expenses:Books $100.00 $39.55
#09-Nov-01 November Expenses:Books $110.00 $48.44
#09-Nov-30 End of November Expenses:Books $110.00 $47.39
#09-Dec-01 December Expenses:Books $120.00 $56.17
#09-Dec-31 End of December Expenses:Books $120.00 $55.00
#end test
#

View File

@ -47,19 +47,20 @@
Assets:Cash
comment
$ hledger -f- check
test reg --display-amount='amount * 10' books
08-Jan-01 January Expenses:Books $100.00 $10.00
08-Jan-01 End of January Expenses:Books $100.00 $20.00
08-Jan-01 January Expenses:Books $100.00 $30.00
08-Jan-01 End of January Expenses:Books $100.00 $40.00
08-Jan-01 January Expenses:Books $100.00 $50.00
08-Jan-01 End of January Expenses:Books $100.00 $60.00
08-Feb-01 February Expenses:Books $200.00 $80.00
08-Feb-01 End of February Expenses:Books $200.00 $100.00
08-Feb-01 February Expenses:Books $200.00 $120.00
08-Feb-01 End of February Expenses:Books $200.00 $140.00
08-Feb-01 February Expenses:Books $200.00 $160.00
08-Feb-01 End of February Expenses:Books $200.00 $180.00
end test
#test reg --display-amount='amount * 10' books
#08-Jan-01 January Expenses:Books $100.00 $10.00
#08-Jan-01 End of January Expenses:Books $100.00 $20.00
#08-Jan-01 January Expenses:Books $100.00 $30.00
#08-Jan-01 End of January Expenses:Books $100.00 $40.00
#08-Jan-01 January Expenses:Books $100.00 $50.00
#08-Jan-01 End of January Expenses:Books $100.00 $60.00
#08-Feb-01 February Expenses:Books $200.00 $80.00
#08-Feb-01 End of February Expenses:Books $200.00 $100.00
#08-Feb-01 February Expenses:Books $200.00 $120.00
#08-Feb-01 End of February Expenses:Books $200.00 $140.00
#08-Feb-01 February Expenses:Books $200.00 $160.00
#08-Feb-01 End of February Expenses:Books $200.00 $180.00
#end test
#

View File

@ -47,19 +47,20 @@
Assets:Cash
comment
$ hledger -f- check
test reg --display-total='amount * 10' books
08-Jan-01 January Expenses:Books $10.00 $100.00
08-Jan-01 End of January Expenses:Books $10.00 $100.00
08-Jan-01 January Expenses:Books $10.00 $100.00
08-Jan-01 End of January Expenses:Books $10.00 $100.00
08-Jan-01 January Expenses:Books $10.00 $100.00
08-Jan-01 End of January Expenses:Books $10.00 $100.00
08-Feb-01 February Expenses:Books $20.00 $200.00
08-Feb-01 End of February Expenses:Books $20.00 $200.00
08-Feb-01 February Expenses:Books $20.00 $200.00
08-Feb-01 End of February Expenses:Books $20.00 $200.00
08-Feb-01 February Expenses:Books $20.00 $200.00
08-Feb-01 End of February Expenses:Books $20.00 $200.00
end test
#test reg --display-total='amount * 10' books
#08-Jan-01 January Expenses:Books $10.00 $100.00
#08-Jan-01 End of January Expenses:Books $10.00 $100.00
#08-Jan-01 January Expenses:Books $10.00 $100.00
#08-Jan-01 End of January Expenses:Books $10.00 $100.00
#08-Jan-01 January Expenses:Books $10.00 $100.00
#08-Jan-01 End of January Expenses:Books $10.00 $100.00
#08-Feb-01 February Expenses:Books $20.00 $200.00
#08-Feb-01 End of February Expenses:Books $20.00 $200.00
#08-Feb-01 February Expenses:Books $20.00 $200.00
#08-Feb-01 End of February Expenses:Books $20.00 $200.00
#08-Feb-01 February Expenses:Books $20.00 $200.00
#08-Feb-01 End of February Expenses:Books $20.00 $200.00
#end test
#

View File

@ -47,13 +47,14 @@
Assets:Cash
comment
$ hledger -f- check
test reg --display='payee =~ /February/' books
08-Feb-01 February Expenses:Books $20.00 $80.00
08-Feb-01 End of February Expenses:Books $20.00 $100.00
08-Feb-01 February Expenses:Books $20.00 $120.00
08-Feb-01 End of February Expenses:Books $20.00 $140.00
08-Feb-01 February Expenses:Books $20.00 $160.00
08-Feb-01 End of February Expenses:Books $20.00 $180.00
end test
#test reg --display='payee =~ /February/' books
#08-Feb-01 February Expenses:Books $20.00 $80.00
#08-Feb-01 End of February Expenses:Books $20.00 $100.00
#08-Feb-01 February Expenses:Books $20.00 $120.00
#08-Feb-01 End of February Expenses:Books $20.00 $140.00
#08-Feb-01 February Expenses:Books $20.00 $160.00
#08-Feb-01 End of February Expenses:Books $20.00 $180.00
#end test
#

View File

@ -47,9 +47,10 @@
Assets:Cash
comment
$ hledger -f- check
test reg --dow books
08-Jan-01 Tuesdays Expenses:Books $60.00 $60.00
08-Feb-01 Fridays Expenses:Books $120.00 $180.00
end test
#test reg --dow books
#08-Jan-01 Tuesdays Expenses:Books $60.00 $60.00
#08-Feb-01 Fridays Expenses:Books $120.00 $180.00
#end test
#

Some files were not shown because too many files have changed in this diff Show More