move add command doctests to shell tests

This commit is contained in:
Simon Michael 2009-07-09 18:38:57 +00:00
parent e3e935e129
commit e110976b47
4 changed files with 12 additions and 18 deletions

View File

@ -191,21 +191,3 @@ transactionsSimilarTo l s =
ts = ledger_txns $ rawledger l
threshold = 0
{- doctests
@
$ echo "2009/13/1"|hledger -f /dev/null add 2>&1|tail -1|sed -e's/\[[^]]*\]//g' # a bad date is not accepted
date : date :
@
@
$ echo|hledger -f /dev/null add 2>&1|tail -1|sed -e's/\[[^]]*\]//g' # a blank date is ok
date : description:
@
@
$ printf "\n\n"|hledger -f /dev/null add 2>&1|tail -1|sed -e's/\[[^]]*\]//g' # a blank description should fail
date : description: description:
@
-}

View File

@ -0,0 +1,4 @@
; ignore the binary we are invoked with
-f/dev/null; echo "2009/1/32" | hledger add 2>&1 | tail -1 | sed -e's/\[[^]]*\]//g'
>>>
date : date :

View File

@ -0,0 +1,4 @@
; ignore the binary we are invoked with
-f/dev/null; echo | hledger add 2>&1 |tail -1 |sed -e's/\[[^]]*\]//g'
>>>
date : description:

View File

@ -0,0 +1,4 @@
; ignore the binary we are invoked with
-f/dev/null; printf "\n\n" | hledger add 2>&1 |tail -1 | sed -e's/\[[^]]*\]//g'
>>>
date : description: description: