hpath/hpath-directory/test/System/Posix/RawFilePath/Directory/ToAbsSpec.hs

27 lines
536 B
Haskell
Raw Normal View History

2020-01-26 19:00:33 +00:00
{-# LANGUAGE OverloadedStrings #-}
module System.Posix.RawFilePath.Directory.ToAbsSpec where
import Test.Hspec
import "hpath-directory" System.Posix.RawFilePath.Directory
spec :: Spec
spec = describe "System.Posix.RawFilePath.Directory.toAbs" $ do
-- successes --
it "toAbs returns absolute paths unchanged" $ do
let p1 = "/a/b/c/d"
to <- toAbs p1
p1 `shouldBe` to
it "toAbs returns even existing absolute paths unchanged" $ do
let p1 = "/home"
to <- toAbs p1
p1 `shouldBe` to