Skip to content

Commit

Permalink
UtilsSpecs: Unit test corrected
Browse files Browse the repository at this point in the history
- Use Path.Combine instead of +Path.DirectorySeparatorChar.ToString()+
- Fixes error if HOMEPATH=\ (Root directory, result was 'H:\\' or '//data' on Unix)
  • Loading branch information
Daniel Mueller committed Aug 19, 2015
1 parent 9289b97 commit 71b69f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/Paket.Tests/UtilsSpecs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let ``createRelativePath should handle spaces``() =
let ``normalize path with home directory``() =
"~/data"
|> Utils.normalizeLocalPath
|> shouldEqual (AbsolutePath (GetHomeDirectory() + Path.DirectorySeparatorChar.ToString() + "data"))
|> shouldEqual (AbsolutePath (Path.Combine(GetHomeDirectory(), "data")))

[<Test>]
let ``relative local path is returned as is``() =
Expand Down

0 comments on commit 71b69f3

Please sign in to comment.