Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5613ba1dfa | ||
|
|
07aa83ca19 | ||
|
|
a68b46b060 |
@@ -1,5 +1,5 @@
|
||||
name: path
|
||||
version: 0.2.0
|
||||
version: 0.3.0
|
||||
synopsis: Path
|
||||
description: Path
|
||||
license: BSD3
|
||||
|
||||
@@ -10,7 +10,6 @@ module Path.Internal
|
||||
where
|
||||
|
||||
import Data.Data
|
||||
import GHC.Generics
|
||||
|
||||
-- | Path of some base and type.
|
||||
--
|
||||
@@ -22,7 +21,7 @@ import GHC.Generics
|
||||
-- All directories end in a trailing separator. There are no duplicate
|
||||
-- path separators @\/\/@, no @..@, no @.\/@, no @~\/@, etc.
|
||||
newtype Path b t = Path FilePath
|
||||
deriving (Typeable,Generic)
|
||||
deriving (Typeable)
|
||||
|
||||
-- | String equality.
|
||||
--
|
||||
|
||||
10
test/Main.hs
10
test/Main.hs
@@ -23,7 +23,7 @@ spec =
|
||||
describe "Operations: (</>)" operationAppend
|
||||
describe "Operations: stripDir" operationStripDir
|
||||
describe "Operations: isParentOf" operationIsParentOf
|
||||
describe "Operations: parentAbs" operationParentAbs
|
||||
describe "Operations: parent" operationParent
|
||||
describe "Operations: filename" operationFilename
|
||||
|
||||
-- | The 'filename' operation.
|
||||
@@ -38,10 +38,10 @@ operationFilename =
|
||||
filename $(mkRelFile "bar.txt")) ==
|
||||
$(mkRelFile "bar.txt"))
|
||||
|
||||
-- | The 'parentAbs' operation.
|
||||
operationParentAbs :: Spec
|
||||
operationParentAbs =
|
||||
do it "parentAbs (parent </> child) == parent"
|
||||
-- | The 'parent' operation.
|
||||
operationParent :: Spec
|
||||
operationParent =
|
||||
do it "parent (parent </> child) == parent"
|
||||
(parent ($(mkAbsDir "/foo") </>
|
||||
$(mkRelDir "bar")) ==
|
||||
$(mkAbsDir "/foo"))
|
||||
|
||||
Reference in New Issue
Block a user