mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-12-26 10:35:04 +03:00
2617bd5f66
Also fixed path issues when running on Windows.
18 lines
480 B
Haskell
18 lines
480 B
Haskell
module Path.ExtraTest where
|
|
|
|
import Test.Tasty.Hspec
|
|
|
|
import Path (reldir)
|
|
import qualified Path.Extra as PE
|
|
|
|
|
|
spec_reversePosixPath :: Spec
|
|
spec_reversePosixPath = do
|
|
[reldir|.|] ~> "."
|
|
[reldir|foo|] ~> ".."
|
|
[reldir|foo/bar|] ~> "../.."
|
|
[reldir|./foo/bar/./test|] ~> "../../.."
|
|
where
|
|
path ~> expectedReversedPath = it ((show path) ++ " -> " ++ expectedReversedPath) $ do
|
|
PE.reversePosixPath (PE.toPosixFilePath path) `shouldBe` expectedReversedPath
|