Remove 'more' function and move the $env:PAGER capability into the help function (#6059)

This commit is contained in:
Ilya
2018-05-04 09:25:05 -07:00
committed by Dongbo Wang
parent 145cb77226
commit c1026b3ae8
3 changed files with 30 additions and 36 deletions
@@ -39,7 +39,7 @@ function GetCurrentUserHelpRoot {
Describe "Validate that <pshome>/<culture>/default.help.txt is present" -Tags @('CI') {
It "Get-Help returns information about the help system." {
It "Get-Help returns information about the help system" {
$help = Get-Help
$help.Name | Should -Be "default"
@@ -48,6 +48,20 @@ Describe "Validate that <pshome>/<culture>/default.help.txt is present" -Tags @(
}
}
Describe "Validate that the Help function can Run in strict mode" -Tags @('CI') {
It "Help doesn't fail when strict mode is on" {
$help = & {
# run in nested scope to keep strict mode from affecting other tests
Set-StrictMode -Version Latest
Help
}
# the help function renders the help content as text so just verify that there is content
$help | Should -Not -BeNullOrEmpty
}
}
Describe "Validate that get-help works for CurrentUserScope" -Tags @('CI') {
BeforeAll {
$SavedProgressPreference = $ProgressPreference