functional test de-hard-codifications

This commit is contained in:
Simon Michael 2012-04-13 21:48:29 +00:00
parent 021d61b285
commit d4a1e51f2c
4 changed files with 7 additions and 7 deletions

View File

@ -2,14 +2,14 @@
# data validation
#
# 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
>>> /date, or \. to end.*: date, or \. to end.*/
>>>=0
# 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/
@ -19,7 +19,7 @@
# precision and commodity handling
#
# 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
<<<

View File

@ -1,12 +1,12 @@
# commands should generally autocreate an empty journal when missing, see also add*.test
# $$ 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/
>>>=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/
>>>=0

View File

@ -95,7 +95,7 @@ bin/hledger -f - balance --cost
# 0
## 6. with a default commodity.. XXX should observe it
bin/hledger -f - balance --cost
bin/hledger -f - balance --cost
<<<
D $1000.0
2001/01/01 * ACME fund

View File

@ -1,5 +1,5 @@
# 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
income:unknown $-50