Change 'Platform.XDG_Type' and 'Platform.SelectProductNameForDirectory' back to 'public'

Add CI tests for the module path change
This commit is contained in:
Dongbo Wang committed 2016-08-11 21:45:20 -07:00
1 parent 753b202a75
commit 8bb291896c
2 files changed
+34 -2

No files matched your search

@@ -0,0 +1,32 @@
Describe "Module Path Basic Tests" -tags "CI" {
It "validate module path on windows" -Skip:(!$IsWindows) {
$paths = $env:PSModulePath -split [System.IO.Path]::PathSeparator
$paths.Count | Should Be 3
$expectedUserPath = Join-Path -Path $HOME -ChildPath 'Documents\PowerShell\Modules'
$paths[0] | Should Be $expectedUserPath
$expectedSharedPath = Join-Path -Path $env:ProgramFiles -ChildPath 'PowerShell\Modules'
$paths[1] | Should Be $expectedSharedPath
$expectedSystemPath = Join-Path -Path $PSHOME -ChildPath 'Modules'
$paths[2] | Should Be $expectedSystemPath
}
It "validate module path on unix" -Skip:($IsWindows) {
$paths = $env:PSModulePath -split [System.IO.Path]::PathSeparator
$paths.Count | Should Be 3
$expectedUserPath = [System.Management.Automation.Platform]::SelectProductNameForDirectory("USER_MODULES")
$paths[0] | Should Be $expectedUserPath
$expectedSharedPath = [System.Management.Automation.Platform]::SelectProductNameForDirectory("SHARED_MODULES")
$paths[1] | Should Be $expectedSharedPath
$expectedSystemPath = Join-Path -Path $PSHOME -ChildPath 'Modules'
$paths[2] | Should Be $expectedSystemPath
}
}