@@ -49,6 +49,11 @@ tests = concat $
4949 , (@=?) "Date unknown" $ getField "date" $ renderDateField
5050 "date" "%B %e, %Y" "Date unknown" $ Page
5151 (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")
56+ ]
5257 ]
5358
5459 , fromAssertions "copyBodyToField"
@@ -60,4 +65,10 @@ tests = concat $
6065 [ (Page (M.singleton "bar" "foo") "foo") @=?
6166 copyBodyFromField "bar" (Page (M.singleton "bar" "foo") "qux")
6267 ]
68+
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") "")
73+ ]
6374 ]