File: FileSpec.hs

package info (click to toggle)
haskell-pantry 0.9.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 580 kB
  • sloc: haskell: 8,599; makefile: 3
file content (20 lines) | stat: -rw-r--r-- 559 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
module Pantry.FileSpec
  ( spec
  ) where

import           Control.Monad ( void )
import           Pantry
import           Path
import           Path.IO
import           Test.Hspec

spec :: Spec
spec = describe "loadCabalFilePath" $ do
  it "sanity" $ do
    abs' <- resolveDir' "."
    (f, name, cabalfp) <- runPantryApp $ loadCabalFilePath Nothing abs'
    suffix <- parseRelFile "pantry.cabal"
    cabalfp `shouldBe` abs' </> suffix
    name' <- parsePackageNameThrowing "pantry"
    name `shouldBe` name'
    void $ f NoPrintWarnings