fix edge case failure in prop_view_roundtrips
"./" made it fail, because that gets eliminated
This commit is contained in:
parent
fa62c32233
commit
e4a8366162
1 changed files with 6 additions and 2 deletions
|
@ -283,8 +283,12 @@ fromView view f = MetaData $
|
||||||
- MetaFields that were present in the input metadata
|
- MetaFields that were present in the input metadata
|
||||||
- (excluding fields that are not visible). -}
|
- (excluding fields that are not visible). -}
|
||||||
prop_view_roundtrips :: FilePath -> MetaData -> Bool -> Bool
|
prop_view_roundtrips :: FilePath -> MetaData -> Bool -> Bool
|
||||||
prop_view_roundtrips f metadata visible = null f || viewTooLarge view ||
|
prop_view_roundtrips f metadata visible = or
|
||||||
all hasfields (viewedFiles view viewedFileFromReference f metadata)
|
[ null f
|
||||||
|
, null (takeFileName f) && null (takeDirectory f)
|
||||||
|
, viewTooLarge view
|
||||||
|
, all hasfields (viewedFiles view viewedFileFromReference f metadata)
|
||||||
|
]
|
||||||
where
|
where
|
||||||
view = View (Git.Ref "master") $
|
view = View (Git.Ref "master") $
|
||||||
map (\(mf, mv) -> ViewComponent mf (FilterValues $ S.filter (not . B.null . fromMetaValue) mv) visible)
|
map (\(mf, mv) -> ViewComponent mf (FilterValues $ S.filter (not . B.null . fromMetaValue) mv) visible)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue