Skip to content

Commit

Permalink
tests: Fix test-resolve-category
Browse files Browse the repository at this point in the history
Signed-off-by: hololeap <hololeap@protonmail.com>
  • Loading branch information
hololeap committed May 15, 2024
1 parent 7b48094 commit aa79da9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/resolveCat/Main.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import qualified Distribution.Package as Cabal

import Hackport.Env (runEnv)
import qualified Portage.Overlay as Portage
import qualified Portage.Resolve as Portage
import qualified Portage.PackageId as Portage
Expand All @@ -16,8 +17,8 @@ tests = TestList [ TestLabel "resolve cabal" (test_resolveCategory "dev-haskell"

test_resolveCategory :: String -> String -> Test
test_resolveCategory cat pkg = TestCase $ do
portage_dir <- Portage.portage_dir `fmap` Portage.getInfo
portage <- Portage.loadLazy portage_dir
info <- runEnv Portage.getInfo () mempty
portage <- Portage.loadLazy (Portage.portage_dir info)
let cabal = Cabal.mkPackageName pkg
hits = Portage.resolveFullPortageName portage cabal
expected = Just (Portage.PackageName (Portage.Category cat) (Portage.normalizeCabalPackageName cabal))
Expand Down

0 comments on commit aa79da9

Please sign in to comment.