;fix doctests

This commit is contained in:
Simon Michael 2019-08-31 17:15:48 -07:00
parent c2736be4aa
commit 095badd7f9
2 changed files with 25 additions and 25 deletions

View File

@ -76,107 +76,107 @@ instance Show PeriodicTransaction where
-- --
-- >>> _ptgen "monthly from 2017/1 to 2017/4" -- >>> _ptgen "monthly from 2017/1 to 2017/4"
-- 2017/01/01 -- 2017/01/01
-- ; recur: monthly from 2017/1 to 2017/4 -- ; generated-transaction:~ monthly from 2017/1 to 2017/4
-- a $1.00 -- a $1.00
-- <BLANKLINE> -- <BLANKLINE>
-- 2017/02/01 -- 2017/02/01
-- ; recur: monthly from 2017/1 to 2017/4 -- ; generated-transaction:~ monthly from 2017/1 to 2017/4
-- a $1.00 -- a $1.00
-- <BLANKLINE> -- <BLANKLINE>
-- 2017/03/01 -- 2017/03/01
-- ; recur: monthly from 2017/1 to 2017/4 -- ; generated-transaction:~ monthly from 2017/1 to 2017/4
-- a $1.00 -- a $1.00
-- <BLANKLINE> -- <BLANKLINE>
-- --
-- >>> _ptgen "monthly from 2017/1 to 2017/5" -- >>> _ptgen "monthly from 2017/1 to 2017/5"
-- 2017/01/01 -- 2017/01/01
-- ; recur: monthly from 2017/1 to 2017/5 -- ; generated-transaction:~ monthly from 2017/1 to 2017/5
-- a $1.00 -- a $1.00
-- <BLANKLINE> -- <BLANKLINE>
-- 2017/02/01 -- 2017/02/01
-- ; recur: monthly from 2017/1 to 2017/5 -- ; generated-transaction:~ monthly from 2017/1 to 2017/5
-- a $1.00 -- a $1.00
-- <BLANKLINE> -- <BLANKLINE>
-- 2017/03/01 -- 2017/03/01
-- ; recur: monthly from 2017/1 to 2017/5 -- ; generated-transaction:~ monthly from 2017/1 to 2017/5
-- a $1.00 -- a $1.00
-- <BLANKLINE> -- <BLANKLINE>
-- 2017/04/01 -- 2017/04/01
-- ; recur: monthly from 2017/1 to 2017/5 -- ; generated-transaction:~ monthly from 2017/1 to 2017/5
-- a $1.00 -- a $1.00
-- <BLANKLINE> -- <BLANKLINE>
-- --
-- >>> _ptgen "every 2nd day of month from 2017/02 to 2017/04" -- >>> _ptgen "every 2nd day of month from 2017/02 to 2017/04"
-- 2017/01/02 -- 2017/01/02
-- ; recur: every 2nd day of month from 2017/02 to 2017/04 -- ; generated-transaction:~ every 2nd day of month from 2017/02 to 2017/04
-- a $1.00 -- a $1.00
-- <BLANKLINE> -- <BLANKLINE>
-- 2017/02/02 -- 2017/02/02
-- ; recur: every 2nd day of month from 2017/02 to 2017/04 -- ; generated-transaction:~ every 2nd day of month from 2017/02 to 2017/04
-- a $1.00 -- a $1.00
-- <BLANKLINE> -- <BLANKLINE>
-- 2017/03/02 -- 2017/03/02
-- ; recur: every 2nd day of month from 2017/02 to 2017/04 -- ; generated-transaction:~ every 2nd day of month from 2017/02 to 2017/04
-- a $1.00 -- a $1.00
-- <BLANKLINE> -- <BLANKLINE>
-- --
-- >>> _ptgen "every 30th day of month from 2017/1 to 2017/5" -- >>> _ptgen "every 30th day of month from 2017/1 to 2017/5"
-- 2016/12/30 -- 2016/12/30
-- ; recur: every 30th day of month from 2017/1 to 2017/5 -- ; generated-transaction:~ every 30th day of month from 2017/1 to 2017/5
-- a $1.00 -- a $1.00
-- <BLANKLINE> -- <BLANKLINE>
-- 2017/01/30 -- 2017/01/30
-- ; recur: every 30th day of month from 2017/1 to 2017/5 -- ; generated-transaction:~ every 30th day of month from 2017/1 to 2017/5
-- a $1.00 -- a $1.00
-- <BLANKLINE> -- <BLANKLINE>
-- 2017/02/28 -- 2017/02/28
-- ; recur: every 30th day of month from 2017/1 to 2017/5 -- ; generated-transaction:~ every 30th day of month from 2017/1 to 2017/5
-- a $1.00 -- a $1.00
-- <BLANKLINE> -- <BLANKLINE>
-- 2017/03/30 -- 2017/03/30
-- ; recur: every 30th day of month from 2017/1 to 2017/5 -- ; generated-transaction:~ every 30th day of month from 2017/1 to 2017/5
-- a $1.00 -- a $1.00
-- <BLANKLINE> -- <BLANKLINE>
-- 2017/04/30 -- 2017/04/30
-- ; recur: every 30th day of month from 2017/1 to 2017/5 -- ; generated-transaction:~ every 30th day of month from 2017/1 to 2017/5
-- a $1.00 -- a $1.00
-- <BLANKLINE> -- <BLANKLINE>
-- --
-- >>> _ptgen "every 2nd Thursday of month from 2017/1 to 2017/4" -- >>> _ptgen "every 2nd Thursday of month from 2017/1 to 2017/4"
-- 2016/12/08 -- 2016/12/08
-- ; recur: every 2nd Thursday of month from 2017/1 to 2017/4 -- ; generated-transaction:~ every 2nd Thursday of month from 2017/1 to 2017/4
-- a $1.00 -- a $1.00
-- <BLANKLINE> -- <BLANKLINE>
-- 2017/01/12 -- 2017/01/12
-- ; recur: every 2nd Thursday of month from 2017/1 to 2017/4 -- ; generated-transaction:~ every 2nd Thursday of month from 2017/1 to 2017/4
-- a $1.00 -- a $1.00
-- <BLANKLINE> -- <BLANKLINE>
-- 2017/02/09 -- 2017/02/09
-- ; recur: every 2nd Thursday of month from 2017/1 to 2017/4 -- ; generated-transaction:~ every 2nd Thursday of month from 2017/1 to 2017/4
-- a $1.00 -- a $1.00
-- <BLANKLINE> -- <BLANKLINE>
-- 2017/03/09 -- 2017/03/09
-- ; recur: every 2nd Thursday of month from 2017/1 to 2017/4 -- ; generated-transaction:~ every 2nd Thursday of month from 2017/1 to 2017/4
-- a $1.00 -- a $1.00
-- <BLANKLINE> -- <BLANKLINE>
-- --
-- >>> _ptgen "every nov 29th from 2017 to 2019" -- >>> _ptgen "every nov 29th from 2017 to 2019"
-- 2016/11/29 -- 2016/11/29
-- ; recur: every nov 29th from 2017 to 2019 -- ; generated-transaction:~ every nov 29th from 2017 to 2019
-- a $1.00 -- a $1.00
-- <BLANKLINE> -- <BLANKLINE>
-- 2017/11/29 -- 2017/11/29
-- ; recur: every nov 29th from 2017 to 2019 -- ; generated-transaction:~ every nov 29th from 2017 to 2019
-- a $1.00 -- a $1.00
-- <BLANKLINE> -- <BLANKLINE>
-- 2018/11/29 -- 2018/11/29
-- ; recur: every nov 29th from 2017 to 2019 -- ; generated-transaction:~ every nov 29th from 2017 to 2019
-- a $1.00 -- a $1.00
-- <BLANKLINE> -- <BLANKLINE>
-- --
-- >>> _ptgen "2017/1" -- >>> _ptgen "2017/1"
-- 2017/01/01 -- 2017/01/01
-- ; recur: 2017/1 -- ; generated-transaction:~ 2017/1
-- a $1.00 -- a $1.00
-- <BLANKLINE> -- <BLANKLINE>
-- --

View File

@ -57,7 +57,7 @@ modifyTransactions tmods = map applymods
-- >>> putStr $ showTransaction $ transactionModifierToFunction (TransactionModifier "" ["pong" `post` usd 2]) nulltransaction{tpostings=["ping" `post` usd 1]} -- >>> putStr $ showTransaction $ transactionModifierToFunction (TransactionModifier "" ["pong" `post` usd 2]) nulltransaction{tpostings=["ping" `post` usd 1]}
-- 0000/01/01 -- 0000/01/01
-- ping $1.00 -- ping $1.00
-- pong $2.00 -- pong $2.00 ; generated-posting:=
-- <BLANKLINE> -- <BLANKLINE>
-- >>> putStr $ showTransaction $ transactionModifierToFunction (TransactionModifier "miss" ["pong" `post` usd 2]) nulltransaction{tpostings=["ping" `post` usd 1]} -- >>> putStr $ showTransaction $ transactionModifierToFunction (TransactionModifier "miss" ["pong" `post` usd 2]) nulltransaction{tpostings=["ping" `post` usd 1]}
-- 0000/01/01 -- 0000/01/01
@ -66,7 +66,7 @@ modifyTransactions tmods = map applymods
-- >>> putStr $ showTransaction $ transactionModifierToFunction (TransactionModifier "ping" ["pong" `post` amount{aismultiplier=True, aquantity=3}]) nulltransaction{tpostings=["ping" `post` usd 2]} -- >>> putStr $ showTransaction $ transactionModifierToFunction (TransactionModifier "ping" ["pong" `post` amount{aismultiplier=True, aquantity=3}]) nulltransaction{tpostings=["ping" `post` usd 2]}
-- 0000/01/01 -- 0000/01/01
-- ping $2.00 -- ping $2.00
-- pong $6.00 -- pong $6.00 ; generated-posting:= ping
-- <BLANKLINE> -- <BLANKLINE>
-- --
transactionModifierToFunction :: TransactionModifier -> (Transaction -> Transaction) transactionModifierToFunction :: TransactionModifier -> (Transaction -> Transaction)