1module Pantry.FileSpec (spec) where
2
3import Test.Hspec
4import Pantry
5import Path
6import Path.IO
7import Control.Monad (void)
8
9spec :: Spec
10spec = describe "loadCabalFilePath" $ do
11  it "sanity" $ do
12    abs' <- resolveDir' "."
13    (f, name, cabalfp) <- runPantryApp $ loadCabalFilePath abs'
14    suffix <- parseRelFile "pantry.cabal"
15    cabalfp `shouldBe` abs' </> suffix
16    name' <- parsePackageNameThrowing "pantry"
17    name `shouldBe` name'
18    void $ f NoPrintWarnings
19