mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Use correct casing for cmdlet name and cmdlet parameter name in *.ps1 files (#12584)
This commit is contained in:
@@ -89,8 +89,8 @@ Describe 'Get-Help -Online opens the default web browser and navigates to the cm
|
||||
}
|
||||
}
|
||||
|
||||
It "Get-Help get-process -online" -skip:$skipTest {
|
||||
{ Get-Help get-process -online } | Should -Not -Throw
|
||||
It "Get-Help get-process -online" -Skip:$skipTest {
|
||||
{ Get-Help get-process -Online } | Should -Not -Throw
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ Describe 'Get-Help -Online is not supported on Nano Server and IoT' -Tags "CI" {
|
||||
|
||||
$skipTest = -not ([System.Management.Automation.Platform]::IsIoT -or [System.Management.Automation.Platform]::IsNanoServer)
|
||||
|
||||
It "Get-help -online <cmdletName> throws InvalidOperation." -skip:$skipTest {
|
||||
It "Get-help -online <cmdletName> throws InvalidOperation." -Skip:$skipTest {
|
||||
{ Get-Help Get-Help -Online } | Should -Throw -ErrorId "InvalidOperation,Microsoft.PowerShell.Commands.GetHelpCommand"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ Describe "Validate that the Help function can Run in strict mode" -Tags @('CI')
|
||||
$help = & {
|
||||
# run in nested scope to keep strict mode from affecting other tests
|
||||
Set-StrictMode -Version 3.0
|
||||
Help
|
||||
help
|
||||
}
|
||||
# the help function renders the help content as text so just verify that there is content
|
||||
$help | Should -Not -BeNullOrEmpty
|
||||
@@ -91,7 +91,7 @@ Describe "Validate that get-help works for CurrentUserScope" -Tags @('CI') {
|
||||
|
||||
It "Validate -Description and -Examples sections in help content. Run 'Get-help -name <cmdletName>" -TestCases $testCases {
|
||||
param($cmdletName)
|
||||
$help = get-help -name $cmdletName
|
||||
$help = Get-Help -Name $cmdletName
|
||||
$help.Description | Out-String | Should -Match $cmdletName
|
||||
$help.Examples | Out-String | Should -Match $cmdletName
|
||||
}
|
||||
@@ -135,7 +135,7 @@ Describe "Validate that get-help works for AllUsers Scope" -Tags @('Feature', 'R
|
||||
|
||||
It "Validate -Description and -Examples sections in help content. Run 'Get-help -name <cmdletName>" -TestCases $testCases -Skip:(!(Test-CanWriteToPsHome)) {
|
||||
param($cmdletName)
|
||||
$help = get-help -name $cmdletName
|
||||
$help = Get-Help -Name $cmdletName
|
||||
$help.Description | Out-String | Should -Match $cmdletName
|
||||
$help.Examples | Out-String | Should -Match $cmdletName
|
||||
}
|
||||
|
||||
@@ -347,7 +347,7 @@ Describe "Validate Update-Help from the Web for one PowerShell module." -Tags @(
|
||||
$ProgressPreference = $SavedProgressPreference
|
||||
}
|
||||
|
||||
RunUpdateHelpTests -tag "CI" -Scope 'AllUsers'
|
||||
RunUpdateHelpTests -Tag "CI" -Scope 'AllUsers'
|
||||
}
|
||||
|
||||
Describe "Validate Update-Help from the Web for one PowerShell module for user scope." -Tags @('CI', 'RequireAdminOnWindows', 'RequireSudoOnUnix') {
|
||||
@@ -359,7 +359,7 @@ Describe "Validate Update-Help from the Web for one PowerShell module for user s
|
||||
$ProgressPreference = $SavedProgressPreference
|
||||
}
|
||||
|
||||
RunUpdateHelpTests -tag "CI" -Scope 'CurrentUser'
|
||||
RunUpdateHelpTests -Tag "CI" -Scope 'CurrentUser'
|
||||
}
|
||||
|
||||
Describe "Validate Update-Help from the Web for all PowerShell modules." -Tags @('Feature', 'RequireAdminOnWindows', 'RequireSudoOnUnix') {
|
||||
@@ -371,7 +371,7 @@ Describe "Validate Update-Help from the Web for all PowerShell modules." -Tags @
|
||||
$ProgressPreference = $SavedProgressPreference
|
||||
}
|
||||
|
||||
RunUpdateHelpTests -tag "Feature" -Scope 'AllUsers'
|
||||
RunUpdateHelpTests -Tag "Feature" -Scope 'AllUsers'
|
||||
}
|
||||
|
||||
Describe "Validate Update-Help from the Web for all PowerShell modules for user scope." -Tags @('Feature', 'RequireAdminOnWindows', 'RequireSudoOnUnix') {
|
||||
@@ -383,7 +383,7 @@ Describe "Validate Update-Help from the Web for all PowerShell modules for user
|
||||
$ProgressPreference = $SavedProgressPreference
|
||||
}
|
||||
|
||||
RunUpdateHelpTests -tag "Feature" -Scope 'CurrentUser'
|
||||
RunUpdateHelpTests -Tag "Feature" -Scope 'CurrentUser'
|
||||
}
|
||||
|
||||
Describe "Validate Update-Help -SourcePath for one PowerShell module." -Tags @('CI', 'RequireAdminOnWindows', 'RequireSudoOnUnix') {
|
||||
@@ -395,7 +395,7 @@ Describe "Validate Update-Help -SourcePath for one PowerShell module." -Tags @('
|
||||
$ProgressPreference = $SavedProgressPreference
|
||||
}
|
||||
|
||||
RunUpdateHelpTests -tag "CI" -useSourcePath -Scope 'AllUsers'
|
||||
RunUpdateHelpTests -Tag "CI" -useSourcePath -Scope 'AllUsers'
|
||||
}
|
||||
|
||||
Describe "Validate Update-Help -SourcePath for one PowerShell module for user scope." -Tags @('CI', 'RequireAdminOnWindows', 'RequireSudoOnUnix') {
|
||||
@@ -407,7 +407,7 @@ Describe "Validate Update-Help -SourcePath for one PowerShell module for user sc
|
||||
$ProgressPreference = $SavedProgressPreference
|
||||
}
|
||||
|
||||
RunUpdateHelpTests -tag "CI" -useSourcePath -Scope 'CurrentUser'
|
||||
RunUpdateHelpTests -Tag "CI" -useSourcePath -Scope 'CurrentUser'
|
||||
}
|
||||
|
||||
Describe "Validate Update-Help -SourcePath for all PowerShell modules." -Tags @('Feature', 'RequireAdminOnWindows', 'RequireSudoOnUnix') {
|
||||
@@ -419,7 +419,7 @@ Describe "Validate Update-Help -SourcePath for all PowerShell modules." -Tags @(
|
||||
$ProgressPreference = $SavedProgressPreference
|
||||
}
|
||||
|
||||
RunUpdateHelpTests -tag "Feature" -useSourcePath -Scope 'AllUsers'
|
||||
RunUpdateHelpTests -Tag "Feature" -useSourcePath -Scope 'AllUsers'
|
||||
}
|
||||
|
||||
Describe "Validate Update-Help -SourcePath for all PowerShell modules for user scope." -Tags @('Feature', 'RequireAdminOnWindows', 'RequireSudoOnUnix') {
|
||||
@@ -431,7 +431,7 @@ Describe "Validate Update-Help -SourcePath for all PowerShell modules for user s
|
||||
$ProgressPreference = $SavedProgressPreference
|
||||
}
|
||||
|
||||
RunUpdateHelpTests -tag "Feature" -useSourcePath -Scope 'CurrentUser'
|
||||
RunUpdateHelpTests -Tag "Feature" -useSourcePath -Scope 'CurrentUser'
|
||||
}
|
||||
|
||||
Describe "Validate 'Save-Help -DestinationPath for one PowerShell modules." -Tags @('CI', 'RequireAdminOnWindows') {
|
||||
@@ -442,7 +442,7 @@ Describe "Validate 'Save-Help -DestinationPath for one PowerShell modules." -Tag
|
||||
AfterAll {
|
||||
$ProgressPreference = $SavedProgressPreference
|
||||
}
|
||||
RunSaveHelpTests -tag "CI"
|
||||
RunSaveHelpTests -Tag "CI"
|
||||
}
|
||||
|
||||
Describe "Validate 'Save-Help -DestinationPath for all PowerShell modules." -Tags @('Feature', 'RequireAdminOnWindows') {
|
||||
@@ -453,5 +453,5 @@ Describe "Validate 'Save-Help -DestinationPath for all PowerShell modules." -Tag
|
||||
AfterAll {
|
||||
$ProgressPreference = $SavedProgressPreference
|
||||
}
|
||||
RunSaveHelpTests -tag "Feature"
|
||||
RunSaveHelpTests -Tag "Feature"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user