fix quickcheck test on windows
prop_relPathDirToFileAbs_basics (TestableFilePath ":/") failed on windows. The colon was filtered out after trying to make the path relative, which only removed leading path separators. So, ":/" changed to "/" which is not relative. Filtering out the colon before hand avoids this problem. Sponsored-by: Luke Shumaker on Patreon
This commit is contained in:
parent
e37f0f227b
commit
150d73c268
2 changed files with 4 additions and 1 deletions
|
@ -49,7 +49,8 @@ prop_relPathDirToFileAbs_basics pt = and
|
|||
p = pathSeparator `B.cons` relf
|
||||
-- Make the input a relative path. On windows, make sure it does
|
||||
-- not contain anything that looks like a drive letter.
|
||||
relf = B.filter (not . skipchar) $ B.dropWhile isPathSeparator $
|
||||
relf = B.dropWhile isPathSeparator $
|
||||
B.filter (not . skipchar) $
|
||||
toRawFilePath (fromTestableFilePath pt)
|
||||
skipchar b = b == (fromIntegral (ord ':'))
|
||||
|
||||
|
|
|
@ -51,3 +51,5 @@ Windows 10 version 21H2 (build 19044.1586), 64 bit.
|
|||
Git Annex is great. I use it several times a week with my multigigabyte backups, where it gives structure to my image-based backup routines, so you could say I'm a believer. :)
|
||||
|
||||
[[!meta author=jkniiv]]
|
||||
|
||||
> [[fixed|done]] --[[Joey]]
|
||||
|
|
Loading…
Add table
Reference in a new issue