diff options
author | Joey Hess <joey@kitenet.net> | 2012-12-19 16:36:19 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-12-19 16:36:19 -0400 |
commit | 61307263c9ec3627df867836fc7e4db812c54621 (patch) | |
tree | af9cf913e56ae8489441a655a468cac7b92d11a1 /Annex | |
parent | 271bec8c70920322fee13a052df4a9279255e698 (diff) |
more quickcheck fun
Diffstat (limited to 'Annex')
-rw-r--r-- | Annex/Content/Direct.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Annex/Content/Direct.hs b/Annex/Content/Direct.hs index 64182ddc6..75a32e3fc 100644 --- a/Annex/Content/Direct.hs +++ b/Annex/Content/Direct.hs @@ -17,7 +17,8 @@ module Annex.Content.Direct ( removeCache, genCache, toCache, - Cache + Cache(..), + prop_read_show_direct ) where import Common.Annex @@ -123,6 +124,10 @@ readCache s = case words s of <*> readish mtime _ -> Nothing +-- for quickcheck +prop_read_show_direct :: Cache -> Bool +prop_read_show_direct c = readCache (showCache c) == Just c + genCache :: FilePath -> IO (Maybe Cache) genCache f = catchDefaultIO Nothing $ toCache <$> getFileStatus f |