;dev: cli: a snapshot of ledger's baseline functional tests' data

;dev: cli: ledger tests: comment out all but the sample data
This commit is contained in:
Simon Michael 2022-12-17 23:02:20 -10:00
parent faa5f00f1a
commit caffb22320
222 changed files with 26524 additions and 0 deletions

View File

@ -0,0 +1,40 @@
2011-01-01 * Opening balance
Assets:Bank 10.00 GBP
Equity:Opening balance
2012-01-02 * List XXX before AAA to test sorting
Assets:XXX 5.00 GBP
Assets:Bank
2012-01-03 * List AAA after XXX to test sorting
Assets:AAA 3.00 GBP
Assets:Bank
2012-01-03 * Account name with UTF-8
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

View File

@ -0,0 +1,87 @@
2012-01-01 * Opening balances
Assets:A 10.00
Equity:Opening balances -10.00
2012-01-02 * A to B
Assets:A -10.00
Assets:B 10.00
2012-01-03 * B partly to C
Assets:B -5.00
Assets:C 5.00
2012-01-04 * Borrow
Assets:A 10.00
Liabilities:A -10.00
2012-01-05 * Return A
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

View File

@ -0,0 +1,67 @@
~ Monthly
Expenses:Phone 10.00 GBP
Expenses:Rent 550.00 GBP
Assets
2012-01-10 * Phone expense on holidays
Expenses:Phone 12.00 EUR @@ 10.00 GBP
Assets:Cash -10.00 GBP
2012-01-31 * Rent expense
Expenses:Rent 550.00 GBP
Assets:Cash -550.00 GBP
2012-02-28 * Phone expense
Expenses:Phone 20.00 GBP
Assets:Cash -20.00 GBP
2012-02-29 * Rent expense
Expenses:Rent 530.00 GBP
Assets:Cash -530.00 GBP
2012-03-10 * Phone expense
Expenses:Phone 15.00 GBP
Assets:Cash -15.00 GBP
2012-03-31 * Rent expense
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

View File

@ -0,0 +1,38 @@
2012-02-23 * Test 1
A 10.00
B
2012-02-24 Test 1
C 15.00
D
; leave E/F uncleared
2012-02-25 Test 1
E 20.00
F
; have a cleared posting last for C
2012-02-26 * Test 1
C 30.00
G
; have an uncleared posting last for A
2012-02-27 Test 1
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

View File

@ -0,0 +1,32 @@
2011-01-01 * Opening balance
Assets:Bank 10.00 GBP
Equity:Opening balance
2011-03-04 * Buy AAA
Assets:Broker 2 AAA @ 0.90 GBP
Assets:Bank -1.80 GBP
2011-03-05 * Buy AA2
Assets:Broker 2 "AA2" @ 1.00 GBP
Assets:Bank
2011-03-06 * Get Miles&More airmiles
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

View File

@ -0,0 +1,55 @@
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
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

@ -0,0 +1,3 @@
date,posted,code,payee,amount,total,note,
12/12/2011,12/13/2011,100,Test,$10,$20,test,
12/12/2011,12/12/2011,,,$10,,

View File

@ -0,0 +1,2 @@
date,amount,desc,
01/01/2011,20.00 EUR,test,

View File

@ -0,0 +1,2 @@
date,amount,
01/01/2011,,

View File

@ -0,0 +1,2 @@
date,amount,
bogus,$10,

View File

@ -0,0 +1,3 @@
date,credit,debit,desc,
01/01/2011,20.00 EUR,,test1,
01/02/2011,,10.00 EUR,test2,

View File

@ -0,0 +1,2 @@
date,credit,debit,desc,
01/01/2011,20.00 EUR,10.00 EUR,test1,

View File

@ -0,0 +1,55 @@
2012-01-01 * Opening balances
Assets:A 10.00
Equity:Opening balances -10.00
2012-01-02 * Cleared posting
Assets:A -10.00
Assets:B 10.00
2012-01-03 Uncleared posting
Assets:B -5.00
Assets:C 5.00
2012-01-04=2012-01-05 * aux date
Assets:A 10.00
Liabilities:A -10.00
2012-01-05 * (100) Code
Assets:A -10.00
Liabilities:A 10.00
2012-01-06 * (100) Specify commodity
Assets:A $-10.00
Liabilities:A $10.00
2012-01-07 * (100) Specify commodity
Assets:A -10.00 EUR
Liabilities:A 10.00 EUR
2012-01-08 * (100) With note
;This is an xact note
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

View File

@ -0,0 +1,14 @@
comment
test echo foo
foo
end test
test echo "foo bar"
foo bar
end test
test echo "foo\nbar"
foo\nbar
end test

View File

@ -0,0 +1,68 @@
2012-03-23 * Test 1
A $10.00
B
2012-03-24 * Test 2
; Payee: Test 3
C 20.00 EUR
D
2012-03-25 * Test 4
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

View File

@ -0,0 +1,60 @@
D 1000.00 GBP
2011-03-04 Buy shares
Assets:Broker 2 AAA @ 0.90 GBP
Assets:Bank
2011-03-05 Buy shares
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

View File

@ -0,0 +1,50 @@
2011-03-01 * Z
A 10
B
2011-03-02 * A
C 10
D
2011-03-03 * 9
B 10
E
2011-03-04 * B
B 10
E
2011-03-05 * 1
B 10
E
2011-03-06 * 2
; Payee: 3
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

View File

@ -0,0 +1,41 @@
2012-01-01 * Opening balance
A 10.00 GBP
B
2012-01-02 * Test
A 10.00 GBP @@ 12.00 EUR
B
2012-01-03 * Test
B 12.00 EUR @@ 15.80 USD
C
2012-01-04 * Test
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

View File

@ -0,0 +1,38 @@
P 2012-03-25 EUR 0.83 GBP
P 2012-03-25 EUR 1.32 $
P 2012-03-25 USD 0.75 EUR
P 2012-03-25 AAA $10.00
2012-03-23 * Test 1
C 20.00 EUR @@ 16.71 GBP
D
2012-03-24 * Test 2
E 30.00 GBP
F
2012-03-25 * Test 3
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

View File

@ -0,0 +1,41 @@
2012-01-01 * Opening balance
A 10.00 GBP
B
2012-01-02 * Test
A 10.00 GBP @@ 12.00 EUR
B
2012-01-03 * Test
B 12.00 EUR @@ 15.80 USD
C
2012-01-04 * Test
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

View File

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

View File

@ -0,0 +1,42 @@
2012-01-10 * Phone expense on holidays
Expenses:Phone 12.00 EUR @@ 10.00 GBP
Assets:Cash -10.00 GBP
2012-01-31 * Rent expense
Expenses:Rent 550.00 GBP
Assets:Cash -550.00 GBP
2012-02-01 * Buy AAA
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

View File

@ -0,0 +1,23 @@
comment
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

@ -0,0 +1,64 @@
2012-02-28 * Test 1
E 20.00 EUR
F
2012-02-29 * Test 2
Test 10.01 EUR
F
2012-03-24 Test 3
C 30.00 EUR
D
2012-03-25 (test) Test 4
; Payee: Test 5
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

View File

@ -0,0 +1,66 @@
~ xxx
2012-02-28 * Test
E 30.00 EUR
F
G
2012-03-24 Test
C 30.00 EUR
D
C
2012/03/xx
E 30.00 EUR
F
2012-03-25 * Test
G AAA
H
2012-03-26 * Test
I 1,00.00 EUR
J -100.00 EUR
2012-03-27 * Test
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

View File

@ -0,0 +1,33 @@
2012-02-28 * Test
E 30.00 EUR
F
2012-02-29 * Test
E 30.00 EUR
F
2012-03-24 Test
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

View File

@ -0,0 +1,60 @@
2014-01-01 * Test 1
A $10 ; :bar:
B ; :foo:
2014-01-02 * Test 2
A $10 ; :a:
B
2014-01-03 * Test 3
A $10
B ; :b:
2014-01-03 * Test 4
; :xxx:
A $10
B
2014-01-03 * Test 5
A $10 ; a: aaa
B
2014-02-04 * Test 6
A $10 ; a: aaa
B
2014-01-01 * Test 7
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

View File

@ -0,0 +1,45 @@
2012-03-23 * Test 1
A $10.00
B
2012-03-24 * Test 2
; Payee: Test 3
C 20.00 EUR
D
2012-03-25 * Test 4
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

View File

@ -0,0 +1,45 @@
commodity $
format $1,000.00
account Assets:Cash
check abs(amount) <= 20
check commodity == '$'
default
account Expenses:Food
alias food
payee KFC
2012-02-27 KFC
Expenses:Unknown $20.00
Assets:Cash
2012-02-28 KFC
food $20.00
Assets:Cash
2012-02-29 KFC
food $25.00
Assets:Cash
2012-02-29 KFC
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

View File

@ -0,0 +1,12 @@
alias Foo=Foo
2011-01-01 Test
Foo 10 EUR
Bar
comment
test source -> 1
__ERROR__
While parsing file "$FILE", line 1:
Error: Illegal alias Foo=Foo
end test

View File

@ -0,0 +1,24 @@
alias A=B:A
alias B=C:B
alias C=D:C
account Delta
alias D
2001-01-01 Test
A 10 EUR
Foo
2001-01-01 Test
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

View File

@ -0,0 +1,3 @@
2012-03-12 KFC
Expenses:Food $40
Assets:Cash

View File

@ -0,0 +1,36 @@
apply account Master Account
2012-03-12 KFC
Expenses:Food $20
Assets:Cash
end apply account
apply account Master Account
2012-03-12 KFC
Expenses:Food $20
Assets:Cash
end apply
apply account Master Account
2012-03-12 KFC
Expenses:Food $20
Assets:Cash
end
apply account Master Account
include dir-apply.dat
end
comment
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

@ -0,0 +1,25 @@
commodity $
alias USD
2012-03-12 * $
A $10.00
B
2012-03-12 * USD
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

View File

@ -0,0 +1,26 @@
commodity $
value 10 EUR
commodity USD
alias FOO
value 25 EUR
2012-03-06 KFC
Expenses:Food $20.00
Assets:Cash
2012-03-08 KFC
Expenses:Food USD 750,00
Assets:Cash
2012-03-10 KFC
Expenses:Food USD 750,00
Assets:Cash
comment
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

@ -0,0 +1,23 @@
account A
account B
commodity GBP
2012-03-25 GBP
A 10.00 GBP
B
2012-03-26 EUR
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

View File

@ -0,0 +1,14 @@
apply fixed XCD $0.374531835206
2008/04/08 KFC
Expenses:Food XCD 43.00
Assets:Cash
end apply fixed
comment
test reg
08-Apr-08 KFC Expenses:Food XCD 43.00 XCD 43.00
Assets:Cash XCD -43.00 0
end test

View File

@ -0,0 +1,25 @@
import os
tag PATH
check os.path.isfile(value)
2012-02-29 KFC
; PATH: test/baseline/dir-import_py.test
Expenses:Food $20
Assets:Cash
2012-02-29 KFC
; PATH: test/baseline/dir-import_noexist.test
Expenses:Food $20
Assets:Cash
comment
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

@ -0,0 +1,30 @@
payee KFC
alias Kentucky Fried Chicken
payee Foo Bar Inc
uuid 2a2e21d434356f886c84371eebac6e44f1337fda
2012-03-25 * Kentucky Fried Chicken
A 10
B
2012-03-26 * KFC
A 10 ; Payee: Kentucky Fried Chicken
B
2014-05-13 * UNHELPFUL PAYEE ; will be read as being 'Foo Bar Inc'
; UUID: 2a2e21d434356f886c84371eebac6e44f1337fda
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

View File

@ -0,0 +1,30 @@
python
import os
def check_path(path):
return os.path.isfile(path)
tag PATH
check check_path(value)
check os.path.isfile(value)
2012-02-29 KFC
; PATH: test/baseline/feat-import_py.test
Expenses:Food $20
Assets:Cash
2012-02-29 KFC
; PATH: test/baseline/feat-import_noexist.test
Expenses:Food $20
Assets:Cash
comment
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

@ -0,0 +1,23 @@
tag Happy
check value == 'Valley'
2012-02-27 * KFC
; Happy: Valley
Expenses:Unknown $20.00
; Happy: Summer
Assets:Cash
2012-02-28 * KFC
food $20.00
Assets:Cash
comment
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

@ -0,0 +1,39 @@
2012-03-09 KFC
Expenses:Food 10 CHIK @ $50
Assets:Cash
2012-03-09 KFC
Assets:Cash $75
Expenses:Food -10 CHIK {{$50}} @ $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 {{$50}}
Equity:Capital Gains $-25
comment
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

@ -0,0 +1,37 @@
2009/01/01 Entry
Assets:Cash $10,000.00
Equity:Opening Balances
2009/02/01 Entry
Expenses:Cash $100.00
Assets:Cash
2009/02/02 Entry
Expenses:Cash $100.00
Assets:Cash
2009/02/03 Entry
Expenses:Cash $100.00
Assets:Cash $-100.00 = $9,700.00
2009/02/04 Entry
Expenses:Cash $100.00
Assets:Cash $-100.00 = $9,600.00
2009/02/05 Entry
Expenses:Cash $100.00
Assets:Cash
2009/02/05 Entry
Expenses:Cash
Assets:Cash = ($4,000.00 + $100.00)
comment
test bal
$4,100.00 Assets:Cash
$-10,000.00 Equity:Opening Balances
$5,900.00 Expenses:Cash
--------------------
0
end test

View File

@ -0,0 +1,20 @@
2014-05-01 * Opening balance
Assets:Cash $100
Equity:Opening balance
2014-05-10 * Spend money
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

View File

@ -0,0 +1,15 @@
2012-01-01 Opening Balance
Assets:Checking $100
Equity
2012-01-01 Reconciliation
[Assets:Checking] = $100
comment
test balance
$100 Assets:Checking
$-100 Equity
--------------------
0
end test

View File

@ -0,0 +1,62 @@
;; a.dat
2012-01-01 Test
Expenses:Unknown $100.00
Liabilities:MasterCard
2012-01-02 Test
Expenses:Unknown $100.00
Liabilities:MasterCard
2012-01-03 Test
Expenses:Unknown $100.00
Liabilities:MasterCard
2012-01-04 Test
; UUID: foo
Liabilities:MasterCard $150.00 = $-150
<Assets:Checking>
2012-01-04 Test
; UUID: bar
Liabilities:MasterCard $150.00 = $0
<Assets:Checking>
2012-01-04 Test
; UUID: baz
Liabilities:MasterCard $150.00 = $150
<Assets:Checking>
;; b.dat
2012-01-01 Test
Assets:Checking $150.00
Income
2012-01-02 Test
Assets:Checking $150.00
Income
2012-01-03 Test
Assets:Checking $150.00
Income
2012-01-04 Test
; UUID: foo
Liabilities:MasterCard $150.00
Assets:Checking $-150.00 = $300.00
2012-01-04 Test
; UUID: bar
Liabilities:MasterCard $150.00
Assets:Checking $-150.00 = $150.00
comment
test balance
$300.00 Expenses:Unknown
$-450.00 Income
$150.00 Liabilities:MasterCard
--------------------
0
end test

View File

@ -0,0 +1,20 @@
= /Checking/
check account =~ /Foo/
2010-06-24 Sample
Expenses:Food $100
Assets:Checking
check account("Assets:Checking").all(account =~ /Expense/)
comment
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

@ -0,0 +1,3 @@
date,payee,amount
2012/01/01,KFC,$10
2012/01/02,"REWE SAGT DANKE 123454321",10€

View File

@ -0,0 +1,30 @@
account Expenses:Food
payee KFC
payee REWE
payee REWE
alias REWE SAGT DANKE
# When reading csv file without directives:
comment
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

@ -0,0 +1,26 @@
P 1989/01/15 12:00:00 GAL $3
1990/01/01 Payee
Expenses:Gas 100 GAL {=$2}
Liabilities:MasterCard $-200
P 1990/01/15 12:00:00 GAL $3
1990/02/01 Payee
Expenses:Gas 100 FOO {$2}
Liabilities:MasterCard $-200
P 1990/02/15 12:00:00 FOO $3
1990/02/20 Payee
Expenses:Gas 100 FOO
Liabilities:MasterCard
comment
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

@ -0,0 +1,25 @@
--import featimport.py
tag PATH
check check_path(value)
2012-02-29 KFC
; PATH: test/baseline/feat-import_py.test
Expenses:Food $20
Assets:Cash
2012-02-29 KFC
; PATH: test/baseline/feat-import_noexist.test
Expenses:Food $20
Assets:Cash
comment
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

@ -0,0 +1,16 @@
python
def option_pyfirst(context):
print("In --pyfirst (from %s)" % context)
def option_pysecond(context, val):
print("In --pysecond=%s (from %s)" % (val, context))
--pyfirst
--pysecond Hey
comment
test reg
In --pyfirst (from $FILE)
In --pysecond=Hey (from $FILE)
end test

View File

@ -0,0 +1,101 @@
;; A valuation function receives three arguments:
;;
;; 'source' A string identifying the commodity whose price
;; is being asked for (example: "EUR")
;;
;; 'date' The reference date the price should be relative.
;;
;; 'target' A string identifying the "target" commodity, or
;; the commodity the returned price should be in.
;; This argument is null if -V was used instead of -X.
;;
;; The valuation function should return an amount. If you've written your
;; function in Python, you can return something like Amount("$100"). If the
;; function returns an explicit value, that value is always used, regardless
;; of the commodity, the date, or the desired target commodity.
define myfunc_seven(s, d, t) = 7 EUR
;; In order to specific a fixed price, but still valuate that price into the
;; target commodity, use something like this:
define myfunc_five(s, d, t) = market(5 EUR, d, t)
;; The 'value' directive sets the valuation used for all commodities used in
;; the rest of the daat stream. This is the fallback, if nothing more
;; specific is found.
value myfunc_seven
;; You can set a specific valuation function on a per-commodity basis.
;; Instead of defining a function, you can also pass a lambda.
commodity $
value s, d, t -> 6 EUR
;; Each account can also provide a default valuation function for any
;; commodities transferred to that account.
account Expenses:Food5
value myfunc_five
;; The metadata field "Value", if found, overrides the valuation function on a
;; transaction-wide or per-posting basis.
= @XACT and Food
; Value:: 8 EUR
(Equity) $1
= @POST and Dining
(Expenses:Food9) $1
; Value:: 9 EUR
;; Lastly, you can specify the valuation function/value for any specific
;; amount using the (( )) commodity annotation.
2012-03-02 KFC
Expenses:Food2 $1 ((2 EUR))
Assets:Cash2
2012-03-03 KFC
Expenses:Food3 $1
; Value:: 3 EUR
Assets:Cash3
2012-03-04 KFC
; Value:: 4 EUR
Expenses:Food4 $1
Assets:Cash4
2012-03-05 KFC
Expenses:Food5 $1
Assets:Cash5
2012-03-06 KFC
Expenses:Food6 $1
Assets:Cash6
2012-03-07 KFC
Expenses:Food7 1 CAD
Assets:Cash7
2012-03-08 XACT
Expenses:Food8 $1
Assets:Cash8
2012-03-09 POST
Expenses:Dining9 $1
Assets:Cash9
comment
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

@ -0,0 +1,26 @@
python
from __future__ import print_function
def print_type(val):
print(type(val), val)
eval print_type(true)
eval print_type([2010/08/10])
eval print_type(10)
eval print_type($10.00)
eval print_type($10.00 + CAD 30)
eval print_type("Hello!")
eval print_type(/Hello!/)
;eval print_type((1, 2, 3))
comment
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

@ -0,0 +1,26 @@
python
from __future__ import print_function
def print_type(val):
print(type(val), val)
eval print_type(true)
eval print_type([2010/08/10])
eval print_type(10)
eval print_type($10.00)
eval print_type($10.00 + CAD 30)
eval print_type("Hello!")
eval print_type(/Hello!/)
;eval print_type((1, 2, 3))
comment
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

@ -0,0 +1,4 @@
import os
def check_path(path_value):
return os.path.isfile(str(path_value))

View File

@ -0,0 +1,5 @@
def option_pyfirst(context):
print "In --pyfirst (from %s)" % context
def option_pysecond(context, val):
print "In --pysecond=%sh (from %s)" % (val, context)

View File

@ -0,0 +1,11 @@
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
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

@ -0,0 +1,11 @@
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
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

@ -0,0 +1,11 @@
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
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

@ -0,0 +1,15 @@
= Books
Expenses:Taxes 0.05
Assets:Checking -0.05
2008/01/01 January
Expenses:Books $10.00
Assets:Cash $-10.00
comment
test print --actual
2008/01/01 January
Expenses:Books $10.00
Assets:Cash $-10.00
end test

View File

@ -0,0 +1,368 @@
~ monthly
Expenses:Books $10.00
Assets:Cash
2008/01/01 January
Expenses:Books $10.00
Liabilities:Cards $10.00
Assets:Cash
2008/01/31 End of January
Expenses:Books $10.00
Liabilities:Cards $10.00
Assets:Cash
2008/02/01 February
Expenses:Books $20.00
Liabilities:Cards $20.00
Assets:Cash
2008/02/28 End of February
Expenses:Books $20.00
Liabilities:Cards $20.00
Assets:Cash
2008/03/01 March
Expenses:Books $30.00
Liabilities:Cards $30.00
Assets:Cash
2008/03/31 End of March
Expenses:Books $30.00
Liabilities:Cards $30.00
Assets:Cash
2008/04/01 April
Expenses:Books $40.00
Liabilities:Cards $40.00
Assets:Cash
2008/04/30 End of April
Expenses:Books $40.00
Liabilities:Cards $40.00
Assets:Cash
2008/05/01 May
Expenses:Books $50.00
Liabilities:Cards $50.00
Assets:Cash
2008/05/31 End of May
Expenses:Books $50.00
Liabilities:Cards $50.00
Assets:Cash
2008/06/01 June
Expenses:Books $60.00
Liabilities:Cards $60.00
Assets:Cash
2008/06/30 End of June
Expenses:Books $60.00
Liabilities:Cards $60.00
Assets:Cash
2008/07/01 July
Expenses:Books $70.00
Liabilities:Cards $70.00
Assets:Cash
2008/07/31 End of July
Expenses:Books $70.00
Liabilities:Cards $70.00
Assets:Cash
2008/08/01 August
Expenses:Books $80.00
Liabilities:Cards $80.00
Assets:Cash
2008/08/31 End of August
Expenses:Books $80.00
Liabilities:Cards $80.00
Assets:Cash
2008/09/01 September
Expenses:Books $90.00
Liabilities:Cards $90.00
Assets:Cash
2008/09/30 End of September
Expenses:Books $90.00
Liabilities:Cards $90.00
Assets:Cash
2008/10/01 October
Expenses:Books $100.00
Liabilities:Cards $100.00
Assets:Cash
2008/10/31 End of October
Expenses:Books $100.00
Liabilities:Cards $100.00
Assets:Cash
2008/11/01 November
Expenses:Books $110.00
Liabilities:Cards $110.00
Assets:Cash
2008/11/30 End of November
Expenses:Books $110.00
Liabilities:Cards $110.00
Assets:Cash
2008/12/01 December
Expenses:Books $120.00
Liabilities:Cards $120.00
Assets:Cash
2008/12/31 End of December
Expenses:Books $120.00
Liabilities:Cards $120.00
Assets:Cash
2009/01/01 January
Expenses:Books $10.00
Liabilities:Cards $10.00
Assets:Cash
2009/01/31 End of January
Expenses:Books $10.00
Liabilities:Cards $10.00
Assets:Cash
2009/02/01 February
Expenses:Books $20.00
Liabilities:Cards $20.00
Assets:Cash
2009/02/28 End of February
Expenses:Books $20.00
Liabilities:Cards $20.00
Assets:Cash
2009/03/01 March
Expenses:Books $30.00
Liabilities:Cards $30.00
Assets:Cash
2009/03/31 End of March
Expenses:Books $30.00
Liabilities:Cards $30.00
Assets:Cash
2009/04/01 April
Expenses:Books $40.00
Liabilities:Cards $40.00
Assets:Cash
2009/04/30 End of April
Expenses:Books $40.00
Liabilities:Cards $40.00
Assets:Cash
2009/05/01 May
Expenses:Books $50.00
Liabilities:Cards $50.00
Assets:Cash
2009/05/31 End of May
Expenses:Books $50.00
Liabilities:Cards $50.00
Assets:Cash
2009/06/01 June
Expenses:Books $60.00
Liabilities:Cards $60.00
Assets:Cash
2009/06/30 End of June
Expenses:Books $60.00
Liabilities:Cards $60.00
Assets:Cash
2009/07/01 July
Expenses:Books $70.00
Liabilities:Cards $70.00
Assets:Cash
2009/07/31 End of July
Expenses:Books $70.00
Liabilities:Cards $70.00
Assets:Cash
2009/08/01 August
Expenses:Books $80.00
Liabilities:Cards $80.00
Assets:Cash
2009/08/31 End of August
Expenses:Books $80.00
Liabilities:Cards $80.00
Assets:Cash
2009/09/01 September
Expenses:Books $90.00
Liabilities:Cards $90.00
Assets:Cash
2009/09/30 End of September
Expenses:Books $90.00
Liabilities:Cards $90.00
Assets:Cash
2009/10/01 October
Expenses:Books $100.00
Liabilities:Cards $100.00
Assets:Cash
2009/10/31 End of October
Expenses:Books $100.00
Liabilities:Cards $100.00
Assets:Cash
2009/11/01 November
Expenses:Books $110.00
Liabilities:Cards $110.00
Assets:Cash
2009/11/30 End of November
Expenses:Books $110.00
Liabilities:Cards $110.00
Assets:Cash
2009/12/01 December
Expenses:Books $120.00
Liabilities:Cards $120.00
Assets:Cash
2009/12/31 End of December
Expenses:Books $120.00
Liabilities:Cards $120.00
Assets:Cash
comment
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

@ -0,0 +1,10 @@
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
test reg --amount-data
2007-02-02 0.35
2007-02-02 -0.35
end test

View File

@ -0,0 +1,11 @@
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
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

@ -0,0 +1,10 @@
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
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

@ -0,0 +1,4 @@
date,amount,desc,
2012/03/01,10,Food,
2012/03/02,10,Phone,
2012/03/02,10,Dining,

View File

@ -0,0 +1,73 @@
2012-01-01 * Opening balance
Assets:Cash 100.00 EUR
Equity:Opening Balance
2012-01-02 * Food
Expenses:Food 25.00 EUR
Assets:Cash -25.00 EUR
2012-01-03 * Phone
Expenses:Phone 10.00 EUR
Assets:Cash -10.00 EUR
2012-01-04 * Dining
Expenses:Food 20.00 EUR
Liabilities:CC -20.00 EUR
comment
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

@ -0,0 +1,22 @@
2008/01/01 January
Expenses:Books $10.00
Assets:Cash
2008/01/31=2008/01/01 End of January
Expenses:Books $10.00 ; [=2008/02/01]
Assets:Cash
2008/02/01 February
Expenses:Books $20.00
Assets:Cash
comment
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

@ -0,0 +1,18 @@
2019-01-01 * Opening balance
Assets:Investments 1000.00 EUR
Equity:Opening balance -1000.00 EUR
2019-03-01 * Bought FOO
Assets:Investments 2 FOO @ 150.00 EUR
Assets:Investments -300.00 EUR
2019-06-01 * Bought FOO
Assets:Investments 1 FOO @ 180.00 EUR
Assets:Investments -180.00 EUR
comment
test bal assets:investments --average-lot-prices
520.00 EUR
3 FOO {160.00 EUR} Assets:Investments
end test

View File

@ -0,0 +1,244 @@
2008/01/01 January
Expenses:Books $10.00
Assets:Cash
2008/01/31 End of January
Expenses:Books $10.00
Assets:Cash
2008/02/01 February
Expenses:Books $20.00
Assets:Cash
2008/02/28 End of February
Expenses:Books $20.00
Assets:Cash
2008/03/01 March
Expenses:Books $30.00
Assets:Cash
2008/03/31 End of March
Expenses:Books $30.00
Assets:Cash
2008/04/01 April
Expenses:Books $40.00
Assets:Cash
2008/04/30 End of April
Expenses:Books $40.00
Assets:Cash
2008/05/01 May
Expenses:Books $50.00
Assets:Cash
2008/05/31 End of May
Expenses:Books $50.00
Assets:Cash
2008/06/01 June
Expenses:Books $60.00
Assets:Cash
2008/06/30 End of June
Expenses:Books $60.00
Assets:Cash
2008/07/01 July
Expenses:Books $70.00
Assets:Cash
2008/07/31 End of July
Expenses:Books $70.00
Assets:Cash
2008/08/01 August
Expenses:Books $80.00
Assets:Cash
2008/08/31 End of August
Expenses:Books $80.00
Assets:Cash
2008/09/01 September
Expenses:Books $90.00
Assets:Cash
2008/09/30 End of September
Expenses:Books $90.00
Assets:Cash
2008/10/01 October
Expenses:Books $100.00
Assets:Cash
2008/10/31 End of October
Expenses:Books $100.00
Assets:Cash
2008/11/01 November
Expenses:Books $110.00
Assets:Cash
2008/11/30 End of November
Expenses:Books $110.00
Assets:Cash
2008/12/01 December
Expenses:Books $120.00
Assets:Cash
2008/12/31 End of December
Expenses:Books $120.00
Assets:Cash
2009/01/01 January
Expenses:Books $10.00
Assets:Cash
2009/01/31 End of January
Expenses:Books $10.00
Assets:Cash
2009/02/01 February
Expenses:Books $20.00
Assets:Cash
2009/02/28 End of February
Expenses:Books $20.00
Assets:Cash
2009/03/01 March
Expenses:Books $30.00
Assets:Cash
2009/03/31 End of March
Expenses:Books $30.00
Assets:Cash
2009/04/01 April
Expenses:Books $40.00
Assets:Cash
2009/04/30 End of April
Expenses:Books $40.00
Assets:Cash
2009/05/01 May
Expenses:Books $50.00
Assets:Cash
2009/05/31 End of May
Expenses:Books $50.00
Assets:Cash
2009/06/01 June
Expenses:Books $60.00
Assets:Cash
2009/06/30 End of June
Expenses:Books $60.00
Assets:Cash
2009/07/01 July
Expenses:Books $70.00
Assets:Cash
2009/07/31 End of July
Expenses:Books $70.00
Assets:Cash
2009/08/01 August
Expenses:Books $80.00
Assets:Cash
2009/08/31 End of August
Expenses:Books $80.00
Assets:Cash
2009/09/01 September
Expenses:Books $90.00
Assets:Cash
2009/09/30 End of September
Expenses:Books $90.00
Assets:Cash
2009/10/01 October
Expenses:Books $100.00
Assets:Cash
2009/10/31 End of October
Expenses:Books $100.00
Assets:Cash
2009/11/01 November
Expenses:Books $110.00
Assets:Cash
2009/11/30 End of November
Expenses:Books $110.00
Assets:Cash
2009/12/01 December
Expenses:Books $120.00
Assets:Cash
2009/12/31 End of December
Expenses:Books $120.00
Assets:Cash
comment
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

@ -0,0 +1,10 @@
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
test bal --balance-format='%(account)\n' --no-total
Assets:Investments:Vanguard:VMMXX
Income:Dividends:Vanguard:VMMXX
end test

View File

@ -0,0 +1,28 @@
i 2007/03/01 23:00:00 A
o 2007/03/02 01:00:00
i 2007/03/11 23:00:00 B
o 2007/03/12 01:00:00
2006/05/22 * Company
Assets:Receivable $4,000.00
Income:Contracts -40h @ $100.00
2006/05/22 * Company
Assets:Receivable $4,000.00
Income:Contracts -40h {$20} @ $100.00
Income:Gains $-3,200.00
comment
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

@ -0,0 +1,12 @@
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
test bal --basis
$0.35 Assets:Investments:Vanguard:VMMXX
$-0.35 Income:Dividends:Vanguard:VMMXX
--------------------
0
end test

View File

@ -0,0 +1,240 @@
2008/01/01 January
Expenses:Books $10.00
Assets:Cash
2008/01/31 End of January
Expenses:Books $10.00
Assets:Cash
2008/02/01 February
Expenses:Books $20.00
Assets:Cash
2008/02/28 End of February
Expenses:Books $20.00
Assets:Cash
2008/03/01 March
Expenses:Books $30.00
Assets:Cash
2008/03/31 End of March
Expenses:Books $30.00
Assets:Cash
2008/04/01 April
Expenses:Books $40.00
Assets:Cash
2008/04/30 End of April
Expenses:Books $40.00
Assets:Cash
2008/05/01 May
Expenses:Books $50.00
Assets:Cash
2008/05/31 End of May
Expenses:Books $50.00
Assets:Cash
2008/06/01 June
Expenses:Books $60.00
Assets:Cash
2008/06/30 End of June
Expenses:Books $60.00
Assets:Cash
2008/07/01 July
Expenses:Books $70.00
Assets:Cash
2008/07/31 End of July
Expenses:Books $70.00
Assets:Cash
2008/08/01 August
Expenses:Books $80.00
Assets:Cash
2008/08/31 End of August
Expenses:Books $80.00
Assets:Cash
2008/09/01 September
Expenses:Books $90.00
Assets:Cash
2008/09/30 End of September
Expenses:Books $90.00
Assets:Cash
2008/10/01 October
Expenses:Books $100.00
Assets:Cash
2008/10/31 End of October
Expenses:Books $100.00
Assets:Cash
2008/11/01 November
Expenses:Books $110.00
Assets:Cash
2008/11/30 End of November
Expenses:Books $110.00
Assets:Cash
2008/12/01 December
Expenses:Books $120.00
Assets:Cash
2008/12/31 End of December
Expenses:Books $120.00
Assets:Cash
2009/01/01 January
Expenses:Books $10.00
Assets:Cash
2009/01/31 End of January
Expenses:Books $10.00
Assets:Cash
2009/02/01 February
Expenses:Books $20.00
Assets:Cash
2009/02/28 End of February
Expenses:Books $20.00
Assets:Cash
2009/03/01 March
Expenses:Books $30.00
Assets:Cash
2009/03/31 End of March
Expenses:Books $30.00
Assets:Cash
2009/04/01 April
Expenses:Books $40.00
Assets:Cash
2009/04/30 End of April
Expenses:Books $40.00
Assets:Cash
2009/05/01 May
Expenses:Books $50.00
Assets:Cash
2009/05/31 End of May
Expenses:Books $50.00
Assets:Cash
2009/06/01 June
Expenses:Books $60.00
Assets:Cash
2009/06/30 End of June
Expenses:Books $60.00
Assets:Cash
2009/07/01 July
Expenses:Books $70.00
Assets:Cash
2009/07/31 End of July
Expenses:Books $70.00
Assets:Cash
2009/08/01 August
Expenses:Books $80.00
Assets:Cash
2009/08/31 End of August
Expenses:Books $80.00
Assets:Cash
2009/09/01 September
Expenses:Books $90.00
Assets:Cash
2009/09/30 End of September
Expenses:Books $90.00
Assets:Cash
2009/10/01 October
Expenses:Books $100.00
Assets:Cash
2009/10/31 End of October
Expenses:Books $100.00
Assets:Cash
2009/11/01 November
Expenses:Books $110.00
Assets:Cash
2009/11/30 End of November
Expenses:Books $110.00
Assets:Cash
2009/12/01 December
Expenses:Books $120.00
Assets:Cash
2009/12/31 End of December
Expenses:Books $120.00
Assets:Cash
comment
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

@ -0,0 +1,18 @@
2012-01-01 * Opening balance
Assets:Cash 100.00 EUR
Equity:Opening Balance
2012-01-02 * Test
; :test:
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

View File

@ -0,0 +1,23 @@
~ Monthly
Expenses:Phone 10.00 GBP
Expenses:Rent 550.00 GBP
Assets
2012-02-28 * Phone expense
Expenses:Phone 20.00 GBP
Assets:Cash -20.00 GBP
2012-02-29 * Rent expense
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

View File

@ -0,0 +1,321 @@
~ monthly
Expenses:Books $10.00
Liabilities $10.00
Assets:Cash
2008/01/01 January
Expenses:Books $10.00
Liabilities:Cards $10.00
Assets:Cash
2008/01/31 End of January
Expenses:Books $10.00
Liabilities:Cards $10.00
Assets:Cash
2008/02/01 February
Expenses:Books $20.00
Liabilities:Cards $20.00
Assets:Cash
2008/02/28 End of February
Expenses:Books $20.00
Liabilities:Cards $20.00
Assets:Cash
2008/03/01 March
Expenses:Books $30.00
Liabilities:Cards $30.00
Assets:Cash
2008/03/31 End of March
Expenses:Books $30.00
Liabilities:Cards $30.00
Assets:Cash
2008/04/01 April
Expenses:Books $40.00
Liabilities:Cards $40.00
Assets:Cash
2008/04/30 End of April
Expenses:Books $40.00
Liabilities:Cards $40.00
Assets:Cash
2008/05/01 May
Expenses:Books $50.00
Liabilities:Cards $50.00
Assets:Cash
2008/05/31 End of May
Expenses:Books $50.00
Liabilities:Cards $50.00
Assets:Cash
2008/06/01 June
Expenses:Books $60.00
Liabilities:Cards $60.00
Assets:Cash
2008/06/30 End of June
Expenses:Books $60.00
Liabilities:Cards $60.00
Assets:Cash
2008/07/01 July
Expenses:Books $70.00
Liabilities:Cards $70.00
Assets:Cash
2008/07/31 End of July
Expenses:Books $70.00
Liabilities:Cards $70.00
Assets:Cash
2008/08/01 August
Expenses:Books $80.00
Liabilities:Cards $80.00
Assets:Cash
2008/08/31 End of August
Expenses:Books $80.00
Liabilities:Cards $80.00
Assets:Cash
2008/09/01 September
Expenses:Books $90.00
Liabilities:Cards $90.00
Assets:Cash
2008/09/30 End of September
Expenses:Books $90.00
Liabilities:Cards $90.00
Assets:Cash
2008/10/01 October
Expenses:Books $100.00
Liabilities:Cards $100.00
Assets:Cash
2008/10/31 End of October
Expenses:Books $100.00
Liabilities:Cards $100.00
Assets:Cash
2008/11/01 November
Expenses:Books $110.00
Liabilities:Cards $110.00
Assets:Cash
2008/11/30 End of November
Expenses:Books $110.00
Liabilities:Cards $110.00
Assets:Cash
2008/12/01 December
Expenses:Books $120.00
Liabilities:Cards $120.00
Assets:Cash
2008/12/31 End of December
Expenses:Books $120.00
Liabilities:Cards $120.00
Assets:Cash
2009/01/01 January
Expenses:Books $10.00
Liabilities:Cards $10.00
Assets:Cash
2009/01/31 End of January
Expenses:Books $10.00
Liabilities:Cards $10.00
Assets:Cash
2009/02/01 February
Expenses:Books $20.00
Liabilities:Cards $20.00
Assets:Cash
2009/02/28 End of February
Expenses:Books $20.00
Liabilities:Cards $20.00
Assets:Cash
2009/03/01 March
Expenses:Books $30.00
Liabilities:Cards $30.00
Assets:Cash
2009/03/31 End of March
Expenses:Books $30.00
Liabilities:Cards $30.00
Assets:Cash
2009/04/01 April
Expenses:Books $40.00
Liabilities:Cards $40.00
Assets:Cash
2009/04/30 End of April
Expenses:Books $40.00
Liabilities:Cards $40.00
Assets:Cash
2009/05/01 May
Expenses:Books $50.00
Liabilities:Cards $50.00
Assets:Cash
2009/05/31 End of May
Expenses:Books $50.00
Liabilities:Cards $50.00
Assets:Cash
2009/06/01 June
Expenses:Books $60.00
Liabilities:Cards $60.00
Assets:Cash
2009/06/30 End of June
Expenses:Books $60.00
Liabilities:Cards $60.00
Assets:Cash
2009/07/01 July
Expenses:Books $70.00
Liabilities:Cards $70.00
Assets:Cash
2009/07/31 End of July
Expenses:Books $70.00
Liabilities:Cards $70.00
Assets:Cash
2009/08/01 August
Expenses:Books $80.00
Liabilities:Cards $80.00
Assets:Cash
2009/08/31 End of August
Expenses:Books $80.00
Liabilities:Cards $80.00
Assets:Cash
2009/09/01 September
Expenses:Books $90.00
Liabilities:Cards $90.00
Assets:Cash
2009/09/30 End of September
Expenses:Books $90.00
Liabilities:Cards $90.00
Assets:Cash
2009/10/01 October
Expenses:Books $100.00
Liabilities:Cards $100.00
Assets:Cash
2009/10/31 End of October
Expenses:Books $100.00
Liabilities:Cards $100.00
Assets:Cash
2009/11/01 November
Expenses:Books $110.00
Liabilities:Cards $110.00
Assets:Cash
2009/11/30 End of November
Expenses:Books $110.00
Liabilities:Cards $110.00
Assets:Cash
2009/12/01 December
Expenses:Books $120.00
Liabilities:Cards $120.00
Assets:Cash
2009/12/31 End of December
Expenses:Books $120.00
Liabilities:Cards $120.00
Assets:Cash
comment
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

@ -0,0 +1,24 @@
~ Monthly since 2010/01/01
Expenses:Bills:Rent $873.00
Expenses:Household $200.00
Income:Salary -$2491.60
Assets:Bank:Checking
~ biweekly from 2010/02/23
Expenses:Bills:Housecleaning $85.00
Assets:Bank:Checking
2010/06/22 c897683b
Expenses:Household $100.00
Assets:Bank:Checking
comment
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

@ -0,0 +1,113 @@
~ monthly
Expenses:Food $100
Expenses:Movies $20
Assets:Cash
~ monthly from 2009
Expenses:Food $101
Expenses:Movies $21
Assets:Cash
~ monthly to 2010
Expenses:Food $102
Expenses:Movies $22
Assets:Cash
~ monthly from 2009 to 2010
Expenses:Food $103
Expenses:Movies $23
Assets:Cash
2009/06/05 Grocery
Expenses:Food $5
Assets:Cash
comment
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

@ -0,0 +1,220 @@
2008/01/01 January
Expenses:Books $10.00
Assets:Cash
2008/01/31 End of January
Expenses:Books $10.00
Assets:Cash
2008/02/01 February
Expenses:Books $20.00
Assets:Cash
2008/02/28 End of February
Expenses:Books $20.00
Assets:Cash
2008/03/01 March
Expenses:Books $30.00
Assets:Cash
2008/03/31 End of March
Expenses:Books $30.00
Assets:Cash
2008/04/01 April
Expenses:Books $40.00
Assets:Cash
2008/04/30 End of April
Expenses:Books $40.00
Assets:Cash
2008/05/01 May
Expenses:Books $50.00
Assets:Cash
2008/05/31 End of May
Expenses:Books $50.00
Assets:Cash
2008/06/01 June
Expenses:Books $60.00
Assets:Cash
2008/06/30 End of June
Expenses:Books $60.00
Assets:Cash
2008/07/01 July
Expenses:Books $70.00
Assets:Cash
2008/07/31 End of July
Expenses:Books $70.00
Assets:Cash
2008/08/01 August
Expenses:Books $80.00
Assets:Cash
2008/08/31 End of August
Expenses:Books $80.00
Assets:Cash
2008/09/01 September
Expenses:Books $90.00
Assets:Cash
2008/09/30 End of September
Expenses:Books $90.00
Assets:Cash
2008/10/01 October
Expenses:Books $100.00
Assets:Cash
2008/10/31 End of October
Expenses:Books $100.00
Assets:Cash
2008/11/01 November
Expenses:Books $110.00
Assets:Cash
2008/11/30 End of November
Expenses:Books $110.00
Assets:Cash
2008/12/01 December
Expenses:Books $120.00
Assets:Cash
2008/12/31 End of December
Expenses:Books $120.00
Assets:Cash
2009/01/01 January
Expenses:Books $10.00
Assets:Cash
2009/01/31 End of January
Expenses:Books $10.00
Assets:Cash
2009/02/01 February
Expenses:Books $20.00
Assets:Cash
2009/02/28 End of February
Expenses:Books $20.00
Assets:Cash
2009/03/01 March
Expenses:Books $30.00
Assets:Cash
2009/03/31 End of March
Expenses:Books $30.00
Assets:Cash
2009/04/01 April
Expenses:Books $40.00
Assets:Cash
2009/04/30 End of April
Expenses:Books $40.00
Assets:Cash
2009/05/01 May
Expenses:Books $50.00
Assets:Cash
2009/05/31 End of May
Expenses:Books $50.00
Assets:Cash
2009/06/01 June
Expenses:Books $60.00
Assets:Cash
2009/06/30 End of June
Expenses:Books $60.00
Assets:Cash
2009/07/01 July
Expenses:Books $70.00
Assets:Cash
2009/07/31 End of July
Expenses:Books $70.00
Assets:Cash
2009/08/01 August
Expenses:Books $80.00
Assets:Cash
2009/08/31 End of August
Expenses:Books $80.00
Assets:Cash
2009/09/01 September
Expenses:Books $90.00
Assets:Cash
2009/09/30 End of September
Expenses:Books $90.00
Assets:Cash
2009/10/01 October
Expenses:Books $100.00
Assets:Cash
2009/10/31 End of October
Expenses:Books $100.00
Assets:Cash
2009/11/01 November
Expenses:Books $110.00
Assets:Cash
2009/11/30 End of November
Expenses:Books $110.00
Assets:Cash
2009/12/01 December
Expenses:Books $120.00
Assets:Cash
2009/12/31 End of December
Expenses:Books $120.00
Assets:Cash
comment
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

@ -0,0 +1,48 @@
account Assets:Cash
account Expenses:Phone
account Expenses:Rent
account Expenses:Food
commodity EUR
commodity GBP
payee Phone
alias MobilePhone
payee Several
tag food
tag Payee
2012-03-20 Phone
Expenses:Phone 20.00 GBP
Assets:Cash
2012-03-21 Rent
Expenses:Rent 550.00 GBP
Assets:Cash
2012-03-22 Food
; :food:
Expenses:Food 20.00 EUR
Assets:Cash
2012-03-23 Several
Expenses:Food 10.00 EUR ; Payee: Food
Expenses:Phone 10.00 EUR ; Payee: MobilePhone
Assets:Cash
comment
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

@ -0,0 +1,22 @@
comment
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

@ -0,0 +1,206 @@
2008/01/01 * January
Expenses:Books $10.00
Assets:Cash
2008/01/31 End of January
Expenses:Books $10.00
Assets:Cash
2008/02/01 * February
Expenses:Books $20.00
Assets:Cash
2008/02/28 End of February
Expenses:Books $20.00
Assets:Cash
2008/03/01 * March
Expenses:Books $30.00
Assets:Cash
2008/03/31 End of March
Expenses:Books $30.00
Assets:Cash
2008/04/01 April
* Expenses:Books $40.00
Assets:Cash
2008/04/30 End of April
* Expenses:Books $40.00
Assets:Cash
2008/05/01 May
Expenses:Books $50.00
* Assets:Cash
2008/05/31 End of May
Expenses:Books $50.00
* Assets:Cash
2008/06/01 June
Expenses:Books $60.00
Assets:Cash
2008/06/30 End of June
Expenses:Books $60.00
Assets:Cash
2008/07/01 July
Expenses:Books $70.00
Assets:Cash
2008/07/31 End of July
Expenses:Books $70.00
Assets:Cash
2008/08/01 August
Expenses:Books $80.00
Assets:Cash
2008/08/31 End of August
Expenses:Books $80.00
Assets:Cash
2008/09/01 September
Expenses:Books $90.00
Assets:Cash
2008/09/30 End of September
Expenses:Books $90.00
Assets:Cash
2008/10/01 October
Expenses:Books $100.00
Assets:Cash
2008/10/31 End of October
Expenses:Books $100.00
Assets:Cash
2008/11/01 November
Expenses:Books $110.00
Assets:Cash
2008/11/30 End of November
Expenses:Books $110.00
Assets:Cash
2008/12/01 December
Expenses:Books $120.00
Assets:Cash
2008/12/31 End of December
Expenses:Books $120.00
Assets:Cash
2009/01/01 January
Expenses:Books $10.00
Assets:Cash
2009/01/31 End of January
Expenses:Books $10.00
Assets:Cash
2009/02/01 February
Expenses:Books $20.00
Assets:Cash
2009/02/28 End of February
Expenses:Books $20.00
Assets:Cash
2009/03/01 March
Expenses:Books $30.00
Assets:Cash
2009/03/31 End of March
Expenses:Books $30.00
Assets:Cash
2009/04/01 April
Expenses:Books $40.00
Assets:Cash
2009/04/30 End of April
Expenses:Books $40.00
Assets:Cash
2009/05/01 May
Expenses:Books $50.00
Assets:Cash
2009/05/31 End of May
Expenses:Books $50.00
Assets:Cash
2009/06/01 June
Expenses:Books $60.00
Assets:Cash
2009/06/30 End of June
Expenses:Books $60.00
Assets:Cash
2009/07/01 July
Expenses:Books $70.00
Assets:Cash
2009/07/31 End of July
Expenses:Books $70.00
Assets:Cash
2009/08/01 August
Expenses:Books $80.00
Assets:Cash
2009/08/31 End of August
Expenses:Books $80.00
Assets:Cash
2009/09/01 September
Expenses:Books $90.00
Assets:Cash
2009/09/30 End of September
Expenses:Books $90.00
Assets:Cash
2009/10/01 October
Expenses:Books $100.00
Assets:Cash
2009/10/31 End of October
Expenses:Books $100.00
Assets:Cash
2009/11/01 November
Expenses:Books $110.00
Assets:Cash
2009/11/30 End of November
Expenses:Books $110.00
Assets:Cash
2009/12/01 December
Expenses:Books $120.00
Assets:Cash
2009/12/31 End of December
Expenses:Books $120.00
Assets:Cash
comment
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

@ -0,0 +1,34 @@
2008/01/01 * (100) January
Expenses:Books $10.00
Assets:Cash
2008/01/31 (101) End of January
Expenses:Books $10.00
Assets:Cash
2008/02/01 * (102) February
Expenses:Books $20.00
Assets:Cash
2008/02/28 (103) End of February
Expenses:Books $20.00
Assets:Cash
2008/03/01 * March
Expenses:Books $30.00
Assets:Cash
comment
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

@ -0,0 +1,34 @@
2008/01/01 * (100) January
Expenses:Books $10.00
Assets:Cash
2008/01/31 (101) End of January
Expenses:Books $10.00
Assets:Cash
2008/02/01 * (102) February
Expenses:Books $20.00
Assets:Cash
2008/02/28 (103) End of February
Expenses:Books $20.00
Assets:Cash
2008/03/01 * March
Expenses:Books $30.00
Assets:Cash
comment
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

@ -0,0 +1,15 @@
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX $0.35
Income:Dividends:Vanguard:VMMXX $-0.35
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
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

@ -0,0 +1,13 @@
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
test bal --collapse
0.350 VMMXX Assets
$-0.35 Income
--------------------
$-0.35
0.350 VMMXX
end test

View File

@ -0,0 +1,46 @@
2009/10/01 Test
Expenses:Food:Dining $10
Expenses:Food:Tips $1
Assets:Cash
2009/10/02 Test
Expenses:Food:Dining $10
Expenses:Food:Tips $1
Assets:Cash
2009/10/03 Test
Expenses:Food:Dining $10
Expenses:Food:Tips $1
Assets:Cash
2009/10/04 Test
Expenses:Food:Dining $10
Expenses:Food:Tips $1
Assets:Cash
2009/10/05 Test
Expenses:Food:Dining $10
Expenses:Food:Tips $1
Assets:Cash
2009/10/06 Test
Expenses:Food:Dining $10
Expenses:Food:Tips $1
Assets:Cash
2009/10/07 Test
Expenses:Food:Dining $10
Expenses:Food:Tips $1
Assets:Cash
comment
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

@ -0,0 +1,13 @@
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
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

@ -0,0 +1,11 @@
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
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

@ -0,0 +1,11 @@
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
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

@ -0,0 +1,11 @@
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
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

@ -0,0 +1,12 @@
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
test bal --cost
$0.35 Assets:Investments:Vanguard:VMMXX
$-0.35 Income:Dividends:Vanguard:VMMXX
--------------------
0
end test

View File

@ -0,0 +1,45 @@
2012-02-28 Phone expense
Expenses:Phone 20.00 GBP
Assets:Cash -20.00 GBP
2012-02-29 * Rent expense
Expenses:Rent 530.00 GBP
Assets:Cash -530.00 GBP
2012-03-03 Phone expense
Expenses:Phone 12.00 EUR
Assets:Cash -12.00 EUR
2012-03-04 * Bed and breakfast
; Payee: Rent expense
; :bnb:
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

View File

@ -0,0 +1,10 @@
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
test csv --csv-format='"%(date)"\n'
"2007/02/02"
"2007/02/02"
end test

View File

@ -0,0 +1,17 @@
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
2700/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
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

@ -0,0 +1,56 @@
2008/01/01 January
Expenses:Books $10.00
Assets:Cash
2008/01/01 End of January
Expenses:Books $10.00
Assets:Cash
2008/01/01 January
Expenses:Books $10.00
Assets:Cash
2008/01/01 End of January
Expenses:Books $10.00
Assets:Cash
2008/01/01 January
Expenses:Books $10.00
Assets:Cash
2008/01/01 End of January
Expenses:Books $10.00
Assets:Cash
2008/02/01 February
Expenses:Books $20.00
Assets:Cash
2008/02/01 End of February
Expenses:Books $20.00
Assets:Cash
2008/02/01 February
Expenses:Books $20.00
Assets:Cash
2008/02/01 End of February
Expenses:Books $20.00
Assets:Cash
2008/02/01 February
Expenses:Books $20.00
Assets:Cash
2008/02/01 End of February
Expenses:Books $20.00
Assets:Cash
comment
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

@ -0,0 +1,11 @@
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
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

@ -0,0 +1,11 @@
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @ $1.00
Income:Dividends:Vanguard:VMMXX $-0.35
comment
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

@ -0,0 +1,52 @@
D 1000.00 GBP
2011-03-04 Buy shares ; date: 2011-04-05
Assets:Broker 2 AAA @ 0.90 GBP
Assets:Bank
2011-03-05 Buy shares ; date: 2011-04-06
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

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