From c5d31c9e10b4f581aad4c75eccaaf111fa0a07fd Mon Sep 17 00:00:00 2001 From: Shuangchi He <34329208+Yulv-git@users.noreply.github.com> Date: Tue, 7 Jun 2022 00:55:33 +0800 Subject: [PATCH] Correct spelling in Comments and tests (#17480) --- build.psm1 | 2 +- test/powershell/Host/TabCompletion/TabCompletion.Tests.ps1 | 2 +- .../Language/Operators/PipelineChainOperator.Tests.ps1 | 2 +- test/powershell/Language/Parser/Parser.Tests.ps1 | 2 +- .../Microsoft.PowerShell.Management/Copy-Item.Tests.ps1 | 4 ++-- .../Microsoft.PowerShell.Utility/Wait-Event.Tests.ps1 | 2 +- test/tools/Modules/PSSysLog/PSSysLog.psm1 | 6 +++--- tools/UpdateDotnetRuntime.ps1 | 2 +- tools/performance/JIT.Regions.xml | 4 ++-- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/build.psm1 b/build.psm1 index 2f2f0bc2d9..c5ceec38c4 100644 --- a/build.psm1 +++ b/build.psm1 @@ -1561,7 +1561,7 @@ function Publish-TestResults # If we attempt to upload a result file which has no test cases in it, then vsts will produce a warning # so check to be sure we actually have a result file that contains test cases to upload. - # If the the "test-case" count is greater than 0, then we have results. + # If the "test-case" count is greater than 0, then we have results. # Regardless, we want to upload this as an artifact, so this logic doesn't pertain to that. if ( @(([xml](Get-Content $Path)).SelectNodes(".//test-case")).Count -gt 0 -or $Type -eq 'XUnit' ) { Write-Host "##vso[results.publish type=$Type;mergeResults=true;runTitle=$Title;publishRunAttachments=true;resultFiles=$tempFilePath;failTaskOnFailedTests=true]" diff --git a/test/powershell/Host/TabCompletion/TabCompletion.Tests.ps1 b/test/powershell/Host/TabCompletion/TabCompletion.Tests.ps1 index f984e3b72c..6844ad1a6c 100644 --- a/test/powershell/Host/TabCompletion/TabCompletion.Tests.ps1 +++ b/test/powershell/Host/TabCompletion/TabCompletion.Tests.ps1 @@ -877,7 +877,7 @@ switch ($x) @{ inputStr = '[math].G'; expected = 'GenericParameterAttributes'; setup = $null } @{ inputStr = '[Environment+specialfolder]::App'; expected = 'ApplicationData'; setup = $null } @{ inputStr = 'icm {get-pro'; expected = 'Get-Process'; setup = $null } - @{ inputStr = 'write-ouput (get-pro'; expected = 'Get-Process'; setup = $null } + @{ inputStr = 'write-output (get-pro'; expected = 'Get-Process'; setup = $null } @{ inputStr = 'iex "get-pro'; expected = '"Get-Process"'; setup = $null } @{ inputStr = '$variab'; expected = '$variableA'; setup = { $variableB = 2; $variableA = 1 } } @{ inputStr = 'a -'; expected = '-keys'; setup = { function a {param($keys) $a} } } diff --git a/test/powershell/Language/Operators/PipelineChainOperator.Tests.ps1 b/test/powershell/Language/Operators/PipelineChainOperator.Tests.ps1 index e2e54c3217..15340dd18e 100644 --- a/test/powershell/Language/Operators/PipelineChainOperator.Tests.ps1 +++ b/test/powershell/Language/Operators/PipelineChainOperator.Tests.ps1 @@ -47,7 +47,7 @@ Describe "Experimental Feature: && and || operators - Feature-Enabled" -Tag CI { @{ Statement = 'testexe -returncode -1 || testexe -returncode -2 && testexe -echoargs "A"'; Output = @('-1', '-2') } @{ Statement = 'testexe -returncode -1 || testexe -returncode -2 || testexe -echoargs "B"'; Output = @('-1', '-2', 'Arg 0 is ') } - # Native command and succesful cmdlet + # Native command and successful cmdlet @{ Statement = 'Test-SuccessfulCommand && testexe -returncode 0'; Output = @('SUCCESS', '0') } @{ Statement = 'testexe -returncode 0 && Test-SuccessfulCommand'; Output = @('0', 'SUCCESS') } @{ Statement = 'Test-SuccessfulCommand && testexe -returncode 1'; Output = @('SUCCESS', '1') } diff --git a/test/powershell/Language/Parser/Parser.Tests.ps1 b/test/powershell/Language/Parser/Parser.Tests.ps1 index 0368dfe9c4..3c38dc0dca 100644 --- a/test/powershell/Language/Parser/Parser.Tests.ps1 +++ b/test/powershell/Language/Parser/Parser.Tests.ps1 @@ -143,7 +143,7 @@ Describe "ParserTests (admin\monad\tests\monad\src\engine\core\ParserTests.cs)" { ExecuteCommand "(" } | Should -Throw -ErrorId "IncompleteParseException" } - It "Throws an exception if the the first statement starts with an empty pipe element (line 188)" { + It "Throws an exception if the first statement starts with an empty pipe element (line 188)" { { ExecuteCommand "| Get-Location" } | Should -Throw -ErrorId "ParseException" } diff --git a/test/powershell/Modules/Microsoft.PowerShell.Management/Copy-Item.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Management/Copy-Item.Tests.ps1 index 7ee3677b5b..1ec37b9c5b 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Management/Copy-Item.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Management/Copy-Item.Tests.ps1 @@ -813,7 +813,7 @@ Describe "Copy-Item remotely bug fixes" -Tags "Feature" { # Copy file to session Copy-Item -Path "TestDrive:\Source\testFile1.txt" -Destination "$TestDrive\Destination\testFile1.txt" -ToSession $s - # Validate the the file was overwritten + # Validate the file was overwritten $fileContent = Get-Content "TestDrive:\Destination\testFile1.txt" -ErrorAction SilentlyContinue -Raw $fileContent | Should -Match $newContent } @@ -823,7 +823,7 @@ Describe "Copy-Item remotely bug fixes" -Tags "Feature" { # Copy file to session Copy-Item -Path "$TestDrive\Source\testFile1.txt" -Destination "TestDrive:\Destination\testFile1.txt" -FromSession $s - # Validate the the file was overwritten + # Validate the file was overwritten $fileContent = Get-Content "TestDrive:\Destination\testFile1.txt" -ErrorAction SilentlyContinue -Raw $fileContent | Should -Match $newContent } diff --git a/test/powershell/Modules/Microsoft.PowerShell.Utility/Wait-Event.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Utility/Wait-Event.Tests.ps1 index 0e9e806002..19628138e9 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Utility/Wait-Event.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Utility/Wait-Event.Tests.ps1 @@ -6,7 +6,7 @@ Describe "Wait-Event" -Tags "CI" { It "Should time out when it does not receive a FakeEvent" { # Don't depend on Measure-Command $stopwatch = [System.Diagnostics.Stopwatch]::startNew() -# Testing the the timeout, so wait for an event that will never be +# Testing the timeout, so wait for an event that will never be # raised because it is fake Wait-Event -Timeout 1 -SourceIdentifier "FakeEvent" $stopwatch.Stop() diff --git a/test/tools/Modules/PSSysLog/PSSysLog.psm1 b/test/tools/Modules/PSSysLog/PSSysLog.psm1 index 00dd74be5a..4dd0da0ade 100644 --- a/test/tools/Modules/PSSysLog/PSSysLog.psm1 +++ b/test/tools/Modules/PSSysLog/PSSysLog.psm1 @@ -38,7 +38,7 @@ log show ./system.logarchive/ --info --predicate 'process == "pwsh"' >pwsh.log.t Parsing Notes: * Sample contains 6.0.1 content (which is out of date) revise with 6.1.0 preview * Ensure analytic data is considered when parsing; specifically Provider_Lifecycle:ProviderStart.Method.Informational -* Multi-line output is expected. Parsing needs to detect the timestamp at the begining +* Multi-line output is expected. Parsing needs to detect the timestamp at the beginning of a line and append subsequent lines to the message until the next 'log' line is found. * Header lines need to be skipped. @@ -564,7 +564,7 @@ function ConvertFrom-SysLog PS> $time = [DateTime]::Parse('1/19/2018 1:26:49 PM') PS> Get-PSSysLog -id 'powershell' -logPath '/var/log/syslog' -After $time - Gets log entries with the id 'powershell' that occured on or after a specific date/time + Gets log entries with the id 'powershell' that occurred on or after a specific date/time .NOTES This function reads syslog entries using Get-Content, filters based on the id, and @@ -908,7 +908,7 @@ function Export-PSOsLog Write-Output $log } else { - throw "did not recieve at least $MinimumCount records but $($logToCount.Count) instead." + throw "did not receive at least $MinimumCount records but $($logToCount.Count) instead." } } -TimeoutInMilliseconds $TimeoutInMilliseconds -IntervalInMilliseconds $IntervalInMilliseconds -LogErrorSb { $log = Start-NativeExecution -command {log show --info @extraParams} diff --git a/tools/UpdateDotnetRuntime.ps1 b/tools/UpdateDotnetRuntime.ps1 index a6e6ca613b..339153bcf0 100644 --- a/tools/UpdateDotnetRuntime.ps1 +++ b/tools/UpdateDotnetRuntime.ps1 @@ -231,7 +231,7 @@ function Get-DotnetUpdate { $Message = $null -eq $currentVersion.PreReleaseLabel ? "$latestSDKversion is not preview, update manually." : "No update needed." } } catch { - Write-Verbose -Verbose "Error occured: $_.message" + Write-Verbose -Verbose "Error occurred: $_.message" $shouldUpdate = $false $newVersion = $null Write-Error "Error while checking .NET SDK update: $($_.message)" diff --git a/tools/performance/JIT.Regions.xml b/tools/performance/JIT.Regions.xml index a6b4f072da..9e339c11bb 100644 --- a/tools/performance/JIT.Regions.xml +++ b/tools/performance/JIT.Regions.xml @@ -3,8 +3,8 @@