functional test de-hard-codifications
This commit is contained in:
parent
021d61b285
commit
d4a1e51f2c
@ -2,14 +2,14 @@
|
|||||||
# data validation
|
# data validation
|
||||||
#
|
#
|
||||||
# 1. should prompt again for a bad date
|
# 1. should prompt again for a bad date
|
||||||
rm -f t$$.j; bin/hledger -f t$$.j add; rm -f t$$.j
|
bin/hledger -f $$-add.j add; rm -f $$-add.j
|
||||||
<<<
|
<<<
|
||||||
2009/1/32
|
2009/1/32
|
||||||
>>> /date, or \. to end.*: date, or \. to end.*/
|
>>> /date, or \. to end.*: date, or \. to end.*/
|
||||||
>>>=0
|
>>>=0
|
||||||
|
|
||||||
# 2. should accept a blank date
|
# 2. should accept a blank date
|
||||||
rm -f t$$.j; bin/hledger -f t$$.j add; rm -f t$$.j
|
bin/hledger -f $$-add.j add; rm -f $$-add.j
|
||||||
<<<
|
<<<
|
||||||
|
|
||||||
>>> /date,.*: description/
|
>>> /date,.*: description/
|
||||||
@ -19,7 +19,7 @@
|
|||||||
# precision and commodity handling
|
# precision and commodity handling
|
||||||
#
|
#
|
||||||
# 3. simple add with no existing journal, no commodity entered
|
# 3. simple add with no existing journal, no commodity entered
|
||||||
rm -f t$$.j; bin/hledger -f t$$.j add; rm -f t$$.j
|
bin/hledger -f $$-add.j add; rm -f $$-add.j
|
||||||
<<<
|
<<<
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
# commands should generally autocreate an empty journal when missing, see also add*.test
|
# commands should generally autocreate an empty journal when missing, see also add*.test
|
||||||
# $$ used for safe concurrent test running, may be a bash-ism
|
# $$ used for safe concurrent test running, may be a bash-ism
|
||||||
|
|
||||||
rm -f $$; bin/hledger register -f $$; rm -f $$
|
bin/hledger register -f no-such-file-$$; rm -f no-such-file-$$
|
||||||
>>>
|
>>>
|
||||||
>>>2 /journal file.*not found/
|
>>>2 /journal file.*not found/
|
||||||
>>>=0
|
>>>=0
|
||||||
|
|
||||||
rm -f $$; bin/hledger balance --no-total -f $$; rm -f $$
|
bin/hledger balance --no-total -f no-such-file-$$; rm -f no-such-file-$$
|
||||||
>>>
|
>>>
|
||||||
>>>2 /journal file.*not found/
|
>>>2 /journal file.*not found/
|
||||||
>>>=0
|
>>>=0
|
||||||
|
|||||||
@ -95,7 +95,7 @@ bin/hledger -f - balance --cost
|
|||||||
# 0
|
# 0
|
||||||
## 6. with a default commodity.. XXX should observe it
|
## 6. with a default commodity.. XXX should observe it
|
||||||
|
|
||||||
bin/hledger -f - balance --cost
|
bin/hledger -f - balance --cost
|
||||||
<<<
|
<<<
|
||||||
D $1000.0
|
D $1000.0
|
||||||
2001/01/01 * ACME fund
|
2001/01/01 * ACME fund
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
# 1. read CSV to hledger journal format
|
# 1. read CSV to hledger journal format
|
||||||
rm -rf t.rules$$; printf 'date-field 0\ndate-format %%d/%%Y/%%m\ndescription-field 1\namount-field 2\ncurrency $\nbase-account assets:myacct\n' >t.rules$$; echo '10/2009/09,Flubber Co,50' | bin/hledger -f- print --rules-file t.rules$$; rm -rf t.rules$$
|
rm -rf t.rules$$; printf 'date-field 0\ndate-format %%d/%%Y/%%m\ndescription-field 1\namount-field 2\ncurrency $\nbase-account assets:myacct\n' >t.rules$$; echo '10/2009/09,Flubber Co,50' | bin/hledger -f- print --rules-file t.rules$$; rm -rf t.rules$$
|
||||||
>>>
|
>>>
|
||||||
2009/09/10 Flubber Co
|
2009/09/10 Flubber Co
|
||||||
income:unknown $-50
|
income:unknown $-50
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user