fix test to work on Windows

This commit is contained in:
Joey Hess 2014-02-25 18:09:45 -04:00
parent 5df3db9027
commit b9147b4012
Failed to extract signature

View file

@ -68,8 +68,8 @@ dirFromViewedFile = joinPath . drop 1 . sep [] ""
prop_viewedFile_roundtrips :: FilePath -> Bool
prop_viewedFile_roundtrips f
| isAbsolute f = True -- Only relative paths are encoded.
| any (isPathSeparator) (end f) = True -- Filenames wanted, not directories.
-- Relative filenames wanted, not directories.
| any (isPathSeparator) (end f ++ beginning f) = True
| otherwise = dir == dirFromViewedFile (viewedFileFromReference f)
where
dir = joinPath $ beginning $ splitDirectories f