read multiple files: tests

This commit is contained in:
Imuli 2015-05-28 11:45:10 -04:00 committed by Simon Michael
parent 49f1744ae5
commit 67432f1220
7 changed files with 52 additions and 0 deletions

2
data/alias.journal Normal file
View File

@ -0,0 +1,2 @@
alias expenses = equity:draw:personal
alias assets = assets:personal

4
data/business.journal Normal file
View File

@ -0,0 +1,4 @@
2014/1/1
expenses:office supplies $1
assets:business checking

4
data/personal.journal Normal file
View File

@ -0,0 +1,4 @@
2014/1/2
expenses:food $1
assets:cash

1
tests/cli/alias.journal Symbolic link
View File

@ -0,0 +1 @@
../../data/alias.journal

1
tests/cli/business.journal Symbolic link
View File

@ -0,0 +1 @@
../../data/business.journal

View File

@ -0,0 +1,39 @@
# 1. all data files on the command line should be read
hledgerdev inc -f personal.journal -f business.journal
>>>
Income Statement
Revenues:
--------------------
0
Expenses:
$2 expenses
$1 food
$1 office supplies
--------------------
$2
Total:
--------------------
$2
>>>2
>>>=0
# 2. aliases in files should only apply to later files
hledgerdev print -f personal.journal -f business.journal -f alias.journal -f personal.journal
>>>
2014/01/01
expenses:office supplies $1
assets:business checking $-1
2014/01/02
expenses:food $1
assets:cash $-1
2014/01/02
equity:draw:personal:food $1
assets:personal:cash $-1
>>>2
>>>=0

1
tests/cli/personal.journal Symbolic link
View File

@ -0,0 +1 @@
../../data/personal.journal