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
|
||||
- (excluding fields that are not visible). -}
|
||||
prop_view_roundtrips :: FilePath -> MetaData -> Bool -> Bool
|
||||
prop_view_roundtrips f metadata visible = null f || viewTooLarge view ||
|
||||
all hasfields (viewedFiles view viewedFileFromReference f metadata)
|
||||
prop_view_roundtrips f metadata visible = or
|
||||
[ null f
|
||||
, null (takeFileName f) && null (takeDirectory f)
|
||||
, viewTooLarge view
|
||||
, all hasfields (viewedFiles view viewedFileFromReference f metadata)
|
||||
]
|
||||
where
|
||||
view = View (Git.Ref "master") $
|
||||
map (\(mf, mv) -> ViewComponent mf (FilterValues $ S.filter (not . B.null . fromMetaValue) mv) visible)
|
||||
|
|
Loading…
Reference in a new issue