@@ -49,6 +49,11 @@ tests = concat $
49 , (@=?) "Date unknown" $ getField "date" $ renderDateField
49 , (@=?) "Date unknown" $ getField "date" $ renderDateField
50 "date" "%B %e, %Y" "Date unknown" $ Page
50 "date" "%B %e, %Y" "Date unknown" $ Page
51 (M.singleton "path" "/posts/a-post.mkdwn") ""
51 (M.singleton "path" "/posts/a-post.mkdwn") ""
52+ , (@=?) "February 20, 2000" $ getField "date" $ renderDateField
53+ "date" "%B %e, %Y" "Date unknown" $ flip Page "" $ M.fromList
54+ [ ("path", "/posts/2010-01-31-a-post.mkdwn")
55+ , ("published", "February 20, 2000 1:00 PM")
54 , fromAssertions "copyBodyToField"
59 , fromAssertions "copyBodyToField"
@@ -60,4 +65,10 @@ tests = concat $
60 [ (Page (M.singleton "bar" "foo") "foo") @=?
65 [ (Page (M.singleton "bar" "foo") "foo") @=?
61 copyBodyFromField "bar" (Page (M.singleton "bar" "foo") "qux")
66 copyBodyFromField "bar" (Page (M.singleton "bar" "foo") "qux")
69+ , fromAssertions "comparePagesByDate"
70+ [ GT @=? comparePagesByDate
71+ (Page (M.singleton "path" "/posts/1990-08-26-foo.mkdwn") "")
72+ (Page (M.singleton "path" "/posts/1990-06-18-qux.mkdwn") "")