journal: another failing test from #807

This commit is contained in:
Simon Michael 2018-08-18 19:49:43 +01:00
parent 7ab8bc2685
commit fc11b5130f

View File

@ -816,8 +816,9 @@ tests_Hledger_Read_JournalReader = TestList $ concat [
easytests = tests "JournalReader" [ easytests = tests "JournalReader" [
tests "periodictransactionp" [ tests "periodictransactionp" [
test "more-period-text-in-comment" $ expectParseEqIO periodictransactionp -- tests from #807
"~ monthly from 2018/6 ;In 2019 we will change this\n" test "more-period-text-in-comment-after-one-space" $ expectParseEqIO periodictransactionp
"~ monthly from 2018/6 ;In 2019 we will change this\n"
nullperiodictransaction { nullperiodictransaction {
ptperiodexpr = "monthly from 2018/6" ptperiodexpr = "monthly from 2018/6"
,ptinterval = Months 1 ,ptinterval = Months 1
@ -829,7 +830,7 @@ easytests = tests "JournalReader" [
,pttags = [] ,pttags = []
,ptpostings = [] ,ptpostings = []
} }
,_test "more-period-text-in-description-after-two-spaces" $ expectParseEqIO periodictransactionp ,_test "more-period-text-in-description-after-two-spaces" $ expectParseEqIO periodictransactionp -- TODO
"~ monthly from 2018/6 In 2019 we will change this\n" "~ monthly from 2018/6 In 2019 we will change this\n"
nullperiodictransaction { nullperiodictransaction {
ptperiodexpr = "monthly from 2018/6" ptperiodexpr = "monthly from 2018/6"
@ -837,7 +838,7 @@ easytests = tests "JournalReader" [
,ptspan = DateSpan (Just $ parsedate "2018/06/01") Nothing ,ptspan = DateSpan (Just $ parsedate "2018/06/01") Nothing
,ptdescription = "In 2019 we will change this\n" ,ptdescription = "In 2019 we will change this\n"
} }
,_test "more-period-text-in-description-after-one-space" $ expectParseEqIO periodictransactionp ,_test "more-period-text-in-description-after-one-space" $ expectParseEqIO periodictransactionp -- TODO
"~ monthly from 2018/6 In 2019 we will change this\n" "~ monthly from 2018/6 In 2019 we will change this\n"
nullperiodictransaction { nullperiodictransaction {
ptperiodexpr = "monthly from 2018/6" ptperiodexpr = "monthly from 2018/6"
@ -845,6 +846,13 @@ easytests = tests "JournalReader" [
,ptspan = DateSpan (Just $ parsedate "2018/06/01") Nothing ,ptspan = DateSpan (Just $ parsedate "2018/06/01") Nothing
,ptdescription = "In 2019 we will change this\n" ,ptdescription = "In 2019 we will change this\n"
} }
-- TODO any more cases from https://github.com/simonmichael/hledger/pull/807#issuecomment-396994403 ? ,_test "Next-year-in-description" $ expectParseEqIO periodictransactionp -- TODO
"~ monthly Next year blah blah\n"
nullperiodictransaction {
ptperiodexpr = "monthly"
,ptinterval = Months 1
,ptspan = DateSpan Nothing Nothing
,ptdescription = "Next year blah blah\n"
}
] ]
] ]