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 Jan 20, 2024
1 parent a11e231 commit 6895a87
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]
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 6895a87

Please sign in to comment.