From 90cf39cc097d70430ffa7a3eb7da4e5c54caa223 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Sat, 23 May 2009 23:42:51 +0000 Subject: [PATCH] fix add doctests --- AddCommand.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AddCommand.hs b/AddCommand.hs index b247e91cc..384110a29 100644 --- a/AddCommand.hs +++ b/AddCommand.hs @@ -103,17 +103,17 @@ registerFromString s = do {- doctests @ -$ echo "2009/13/1"|hledger -f /dev/null add 2>&1|tail -2|head -1|sed -e's/\[[^]]*\]//g' # a bad date is not accepted +$ 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 -2|head -1|sed -e's/\[[^]]*\]//g' # a blank date is ok +$ echo|hledger -f /dev/null add 2>&1|tail -1|sed -e's/\[[^]]*\]//g' # a blank date is ok date : description: @ @ -$ (echo;echo)|hledger -f /dev/null add 2>&1|tail -2|head -1|sed -e's/\[[^]]*\]//g' # a blank description should fail +$ printf "\n\n"|hledger -f /dev/null add 2>&1|tail -1|sed -e's/\[[^]]*\]//g' # a blank description should fail date : description: description: @