Skip to content

Commit

Permalink
Satisfy -Wincomplete-uni-patterns with toTarPath
Browse files Browse the repository at this point in the history
  • Loading branch information
philderbeast committed Mar 17, 2024
1 parent 3486f36 commit f3f5c0a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hackage-security/tests/TestSuite.hs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ testRepoIndex inMemRepo repo = do
length (directoryEntries dir1) @?= 0

now <- getCurrentTime
inMemRepoSetIndex inMemRepo now [testEntry1]
inMemRepoSetIndex inMemRepo now testEntries1

assertEqual "B" HasUpdates =<< checkForUpdates repo =<< checkExpiry
dir2 <- getDirectory repo
Expand All @@ -264,9 +264,9 @@ testRepoIndex inMemRepo repo = do
_ -> fail "unexpected index entry content"
_ -> fail "unexpected index path"

testEntry1 = Tar.fileEntry path testEntrycontent
where
Right path = Tar.toTarPath False "foo/preferred-versions"
testEntries1 :: [Tar.GenEntry Tar.TarPath linkTarget]

This comment has been minimized.

Copy link
@andreasabel

andreasabel Apr 3, 2024

Member

Unfortunately, this broke compatibility with tar-0.5, which we did not notice.

I now added a CI with the Stackage snapshots for GHC >= 8.4, so we have a more diverse testsuite and might catch such regressions earlier.

I revised 0.6.2.5 and released 0.6.2.6, so we should be good now.

testEntries1 = either (const []) (pure . (`Tar.fileEntry` testEntrycontent))
(Tar.toTarPath False "foo/preferred-versions")
testEntrycontent = BS.pack "foo >= 1"
testEntryIndexFile = IndexPkgPrefs (mkPackageName "foo")

Expand Down

0 comments on commit f3f5c0a

Please sign in to comment.