wasp/waspc/test/Path/ExtraTest.hs
Martin Sosic 2617bd5f66 Now AppVeyor CI builds Wasp on Windows and runs tests.
Also fixed path issues when running on Windows.
2020-09-18 15:22:58 +02:00

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