forked from purescript/spago
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f130b33
commit 2eb0594
Showing
3 changed files
with
38 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
module Test.Spago.Paths where | ||
|
||
import Test.Prelude | ||
|
||
import Test.Spec (Spec) | ||
import Test.Spec as Spec | ||
import Test.Spec.Assertions as Assert | ||
|
||
import Spago.Paths (toGitSearchPath) | ||
|
||
spec :: Spec Unit | ||
spec = Spec.around withTempDir do | ||
Spec.describe "paths" do | ||
Spec.it "generate four paths to parent directories" \ _ -> do | ||
toGitSearchPath "~/a/b/c/d/e" `Assert.shouldEqual` | ||
[ "~/a/b/c/d/e" | ||
, "~/a/b/c/d/e/.." | ||
, "~/a/b/c/d/e/../.." | ||
, "~/a/b/c/d/e/../../../" | ||
] |