From 7fcf03b83bf87f2d8dc385090b11ba264d05a4a3 Mon Sep 17 00:00:00 2001 From: Chunqing Chen Date: Tue, 31 Oct 2017 15:27:59 -0700 Subject: [PATCH 1/3] perminently remove cmdlets that are not supported under Unix and move tests to defaultcommands.tests.ps1 --- .../engine/InitialSessionState.cs | 32 +++++++++---------- .../engine/Basic/DefaultCommands.Tests.ps1 | 32 +++++++++---------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/System.Management.Automation/engine/InitialSessionState.cs b/src/System.Management.Automation/engine/InitialSessionState.cs index 6b57a8318de..72b61894174 100644 --- a/src/System.Management.Automation/engine/InitialSessionState.cs +++ b/src/System.Management.Automation/engine/InitialSessionState.cs @@ -4660,6 +4660,8 @@ internal static SessionStateAliasEntry[] BuiltInAliases new SessionStateAliasEntry("ps", "Get-Process"), new SessionStateAliasEntry("rm", "Remove-Item"), new SessionStateAliasEntry("rmdir", "Remove-Item"), + new SessionStateAliasEntry("cnsn", "Connect-PSSession", "", ReadOnly), + new SessionStateAliasEntry("dnsn", "Disconnect-PSSession", "", ReadOnly), #endif // Bash built-ins we purposefully keep even if they override native commands new SessionStateAliasEntry("cd", "Set-Location", "", AllScope), @@ -4716,8 +4718,6 @@ internal static SessionStateAliasEntry[] BuiltInAliases new SessionStateAliasEntry("ipsn", "Import-PSSession"), new SessionStateAliasEntry("epsn", "Export-PSSession"), #endif - new SessionStateAliasEntry("cnsn", "Connect-PSSession", "", ReadOnly), - new SessionStateAliasEntry("dnsn", "Disconnect-PSSession","", ReadOnly), new SessionStateAliasEntry("nsn", "New-PSSession"), new SessionStateAliasEntry("gsn", "Get-PSSession"), new SessionStateAliasEntry("rsn", "Remove-PSSession"), @@ -5352,18 +5352,27 @@ private static void InitializeCoreCmdletsAndProviders( { {"Add-History", new SessionStateCmdletEntry("Add-History", typeof(AddHistoryCommand), helpFile) }, {"Clear-History", new SessionStateCmdletEntry("Clear-History", typeof(ClearHistoryCommand), helpFile) }, - {"Connect-PSSession", new SessionStateCmdletEntry("Connect-PSSession", typeof(ConnectPSSessionCommand), helpFile) }, {"Debug-Job", new SessionStateCmdletEntry("Debug-Job", typeof(DebugJobCommand), helpFile) }, - {"Disable-PSSessionConfiguration", new SessionStateCmdletEntry("Disable-PSSessionConfiguration", typeof(DisablePSSessionConfigurationCommand), helpFile) }, - {"Disconnect-PSSession", new SessionStateCmdletEntry("Disconnect-PSSession", typeof(DisconnectPSSessionCommand), helpFile) }, #if !UNIX {"Disable-PSRemoting", new SessionStateCmdletEntry("Disable-PSRemoting", typeof(DisablePSRemotingCommand), helpFile) }, {"Enable-PSRemoting", new SessionStateCmdletEntry("Enable-PSRemoting", typeof(EnablePSRemotingCommand), helpFile) }, {"Get-PSHostProcessInfo", new SessionStateCmdletEntry("Get-PSHostProcessInfo", typeof(GetPSHostProcessInfoCommand), helpFile) }, {"Enter-PSHostProcess", new SessionStateCmdletEntry("Enter-PSHostProcess", typeof(EnterPSHostProcessCommand), helpFile) }, {"Exit-PSHostProcess", new SessionStateCmdletEntry("Exit-PSHostProcess", typeof(ExitPSHostProcessCommand), helpFile) }, -#endif + {"Disable-PSSessionConfiguration", new SessionStateCmdletEntry("Disable-PSSessionConfiguration", typeof(DisablePSSessionConfigurationCommand), helpFile) }, {"Enable-PSSessionConfiguration", new SessionStateCmdletEntry("Enable-PSSessionConfiguration", typeof(EnablePSSessionConfigurationCommand), helpFile) }, + {"Get-PSSessionCapability", new SessionStateCmdletEntry("Get-PSSessionCapability", typeof(GetPSSessionCapabilityCommand), helpFile) }, + {"Get-PSSessionConfiguration", new SessionStateCmdletEntry("Get-PSSessionConfiguration", typeof(GetPSSessionConfigurationCommand), helpFile) }, + {"New-PSSessionConfigurationFile", new SessionStateCmdletEntry("New-PSSessionConfigurationFile", typeof(NewPSSessionConfigurationFileCommand), helpFile) }, + {"New-PSSessionOption", new SessionStateCmdletEntry("New-PSSessionOption", typeof(NewPSSessionOptionCommand), helpFile) }, + {"Receive-PSSession", new SessionStateCmdletEntry("Receive-PSSession", typeof(ReceivePSSessionCommand), helpFile) }, + {"Register-PSSessionConfiguration", new SessionStateCmdletEntry("Register-PSSessionConfiguration", typeof(RegisterPSSessionConfigurationCommand), helpFile) }, + {"Unregister-PSSessionConfiguration", new SessionStateCmdletEntry("Unregister-PSSessionConfiguration", typeof(UnregisterPSSessionConfigurationCommand), helpFile) }, + {"Set-PSSessionConfiguration", new SessionStateCmdletEntry("Set-PSSessionConfiguration", typeof(SetPSSessionConfigurationCommand), helpFile) }, + {"Test-PSSessionConfigurationFile", new SessionStateCmdletEntry("Test-PSSessionConfigurationFile", typeof(TestPSSessionConfigurationFileCommand), helpFile) }, + {"Connect-PSSession", new SessionStateCmdletEntry("Connect-PSSession", typeof(ConnectPSSessionCommand), helpFile) }, + {"Disconnect-PSSession", new SessionStateCmdletEntry("Disconnect-PSSession", typeof(DisconnectPSSessionCommand), helpFile) }, +#endif {"Enter-PSSession", new SessionStateCmdletEntry("Enter-PSSession", typeof(EnterPSSessionCommand), helpFile) }, {"Exit-PSSession", new SessionStateCmdletEntry("Exit-PSSession", typeof(ExitPSSessionCommand), helpFile) }, {"Export-ModuleMember", new SessionStateCmdletEntry("Export-ModuleMember", typeof(ExportModuleMemberCommand), helpFile) }, @@ -5374,8 +5383,6 @@ private static void InitializeCoreCmdletsAndProviders( {"Get-Job", new SessionStateCmdletEntry("Get-Job", typeof(GetJobCommand), helpFile) }, {"Get-Module", new SessionStateCmdletEntry("Get-Module", typeof(GetModuleCommand), helpFile) }, {"Get-PSSession", new SessionStateCmdletEntry("Get-PSSession", typeof(GetPSSessionCommand), helpFile) }, - {"Get-PSSessionCapability", new SessionStateCmdletEntry("Get-PSSessionCapability", typeof(GetPSSessionCapabilityCommand), helpFile) }, - {"Get-PSSessionConfiguration", new SessionStateCmdletEntry("Get-PSSessionConfiguration", typeof(GetPSSessionConfigurationCommand), helpFile) }, {"Import-Module", new SessionStateCmdletEntry("Import-Module", typeof(ImportModuleCommand), helpFile) }, {"Invoke-Command", new SessionStateCmdletEntry("Invoke-Command", typeof(InvokeCommandCommand), helpFile) }, {"Invoke-History", new SessionStateCmdletEntry("Invoke-History", typeof(InvokeHistoryCommand), helpFile) }, @@ -5383,28 +5390,21 @@ private static void InitializeCoreCmdletsAndProviders( {"New-ModuleManifest", new SessionStateCmdletEntry("New-ModuleManifest", typeof(NewModuleManifestCommand), helpFile) }, {"New-PSRoleCapabilityFile", new SessionStateCmdletEntry("New-PSRoleCapabilityFile", typeof(NewPSRoleCapabilityFileCommand), helpFile) }, {"New-PSSession", new SessionStateCmdletEntry("New-PSSession", typeof(NewPSSessionCommand), helpFile) }, - {"New-PSSessionConfigurationFile", new SessionStateCmdletEntry("New-PSSessionConfigurationFile", typeof(NewPSSessionConfigurationFileCommand), helpFile) }, - {"New-PSSessionOption", new SessionStateCmdletEntry("New-PSSessionOption", typeof(NewPSSessionOptionCommand), helpFile) }, {"New-PSTransportOption", new SessionStateCmdletEntry("New-PSTransportOption", typeof(NewPSTransportOptionCommand), helpFile) }, {"Out-Default", new SessionStateCmdletEntry("Out-Default", typeof(OutDefaultCommand), helpFile) }, {"Out-Host", new SessionStateCmdletEntry("Out-Host", typeof(OutHostCommand), helpFile) }, {"Out-Null", new SessionStateCmdletEntry("Out-Null", typeof(OutNullCommand), helpFile) }, {"Receive-Job", new SessionStateCmdletEntry("Receive-Job", typeof(ReceiveJobCommand), helpFile) }, - {"Receive-PSSession", new SessionStateCmdletEntry("Receive-PSSession", typeof(ReceivePSSessionCommand), helpFile) }, {"Register-ArgumentCompleter", new SessionStateCmdletEntry("Register-ArgumentCompleter", typeof(RegisterArgumentCompleterCommand), helpFile) }, - {"Register-PSSessionConfiguration", new SessionStateCmdletEntry("Register-PSSessionConfiguration", typeof(RegisterPSSessionConfigurationCommand), helpFile) }, {"Remove-Job", new SessionStateCmdletEntry("Remove-Job", typeof(RemoveJobCommand), helpFile) }, {"Remove-Module", new SessionStateCmdletEntry("Remove-Module", typeof(RemoveModuleCommand), helpFile) }, {"Remove-PSSession", new SessionStateCmdletEntry("Remove-PSSession", typeof(RemovePSSessionCommand), helpFile) }, {"Save-Help", new SessionStateCmdletEntry("Save-Help", typeof(SaveHelpCommand), helpFile) }, {"Set-PSDebug", new SessionStateCmdletEntry("Set-PSDebug", typeof(SetPSDebugCommand), helpFile) }, - {"Set-PSSessionConfiguration", new SessionStateCmdletEntry("Set-PSSessionConfiguration", typeof(SetPSSessionConfigurationCommand), helpFile) }, {"Set-StrictMode", new SessionStateCmdletEntry("Set-StrictMode", typeof(SetStrictModeCommand), helpFile) }, {"Start-Job", new SessionStateCmdletEntry("Start-Job", typeof(StartJobCommand), helpFile) }, {"Stop-Job", new SessionStateCmdletEntry("Stop-Job", typeof(StopJobCommand), helpFile) }, {"Test-ModuleManifest", new SessionStateCmdletEntry("Test-ModuleManifest", typeof(TestModuleManifestCommand), helpFile) }, - {"Test-PSSessionConfigurationFile", new SessionStateCmdletEntry("Test-PSSessionConfigurationFile", typeof(TestPSSessionConfigurationFileCommand), helpFile) }, - {"Unregister-PSSessionConfiguration", new SessionStateCmdletEntry("Unregister-PSSessionConfiguration", typeof(UnregisterPSSessionConfigurationCommand), helpFile) }, {"Update-Help", new SessionStateCmdletEntry("Update-Help", typeof(UpdateHelpCommand), helpFile) }, {"Wait-Job", new SessionStateCmdletEntry("Wait-Job", typeof(WaitJobCommand), helpFile) }, {"Where-Object", new SessionStateCmdletEntry("Where-Object", typeof(WhereObjectCommand), helpFile) }, @@ -5587,4 +5587,4 @@ internal class RunspaceEventSource : EventSource public void LoadCommandStart(string Name) { WriteEvent(25, Name); } public void LoadCommandStop(string Name) { WriteEvent(26, Name); } } -} +} \ No newline at end of file diff --git a/test/powershell/engine/Basic/DefaultCommands.Tests.ps1 b/test/powershell/engine/Basic/DefaultCommands.Tests.ps1 index 4a9e837cc28..5f5a8f0a041 100644 --- a/test/powershell/engine/Basic/DefaultCommands.Tests.ps1 +++ b/test/powershell/engine/Basic/DefaultCommands.Tests.ps1 @@ -25,7 +25,7 @@ Describe "Verify approved aliases list" -Tags "CI" { "Alias", "clp", "Clear-ItemProperty", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" "Alias", "cls", "Clear-Host", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "" "Alias", "clv", "Clear-Variable", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" -"Alias", "cnsn", "Connect-PSSession", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "cnsn", "Connect-PSSession", $($FullCLR -or $CoreWindows ), "ReadOnly", "" "Alias", "compare", "Compare-Object", $($FullCLR -or $CoreWindows ), "ReadOnly", "" "Alias", "copy", "Copy-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" "Alias", "cp", "Copy-Item", $($FullCLR -or $CoreWindows ), "", "AllScope" @@ -37,7 +37,7 @@ Describe "Verify approved aliases list" -Tags "CI" { "Alias", "del", "Remove-Item", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" "Alias", "diff", "Compare-Object", $($FullCLR -or $CoreWindows ), "ReadOnly", "" "Alias", "dir", "Get-ChildItem", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" -"Alias", "dnsn", "Disconnect-PSSession", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" +"Alias", "dnsn", "Disconnect-PSSession", $($FullCLR -or $CoreWindows ), "ReadOnly", "" "Alias", "ebp", "Enable-PSBreakpoint", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" "Alias", "echo", "Write-Output", $($FullCLR -or $CoreWindows -or $CoreUnix), "", "AllScope" "Alias", "epal", "Export-Alias", $($FullCLR -or $CoreWindows -or $CoreUnix), "ReadOnly", "" @@ -185,7 +185,7 @@ Describe "Verify approved aliases list" -Tags "CI" { "Cmdlet", "Clear-Variable", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "Compare-Object", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "Complete-Transaction", , $($FullCLR ) -"Cmdlet", "Connect-PSSession", , $($FullCLR -or $CoreWindows -or $CoreUnix) +"Cmdlet", "Connect-PSSession", , $($FullCLR -or $CoreWindows ) "Cmdlet", "Connect-WSMan", , $($FullCLR -or $CoreWindows ) "Cmdlet", "ConvertFrom-Csv", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "ConvertFrom-Json", , $($FullCLR -or $CoreWindows -or $CoreUnix) @@ -207,15 +207,15 @@ Describe "Verify approved aliases list" -Tags "CI" { "Cmdlet", "Disable-ComputerRestore", , $($FullCLR ) "Cmdlet", "Disable-PSBreakpoint", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "Disable-PSRemoting", , $($FullCLR -or $CoreWindows ) -"Cmdlet", "Disable-PSSessionConfiguration", , $($FullCLR -or $CoreWindows -or $CoreUnix) +"Cmdlet", "Disable-PSSessionConfiguration", , $($FullCLR -or $CoreWindows ) "Cmdlet", "Disable-RunspaceDebug", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "Disable-WSManCredSSP", , $($FullCLR -or $CoreWindows ) -"Cmdlet", "Disconnect-PSSession", , $($FullCLR -or $CoreWindows -or $CoreUnix) +"Cmdlet", "Disconnect-PSSession", , $($FullCLR -or $CoreWindows ) "Cmdlet", "Disconnect-WSMan", , $($FullCLR -or $CoreWindows ) "Cmdlet", "Enable-ComputerRestore", , $($FullCLR ) "Cmdlet", "Enable-PSBreakpoint", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "Enable-PSRemoting", , $($FullCLR -or $CoreWindows ) -"Cmdlet", "Enable-PSSessionConfiguration", , $($FullCLR -or $CoreWindows -or $CoreUnix) +"Cmdlet", "Enable-PSSessionConfiguration", , $($FullCLR -or $CoreWindows ) "Cmdlet", "Enable-RunspaceDebug", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "Enable-WSManCredSSP", , $($FullCLR -or $CoreWindows ) "Cmdlet", "Enter-PSHostProcess", , $($FullCLR -or $CoreWindows ) @@ -277,8 +277,8 @@ Describe "Verify approved aliases list" -Tags "CI" { "Cmdlet", "Get-PSHostProcessInfo", , $($FullCLR -or $CoreWindows ) "Cmdlet", "Get-PSProvider", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "Get-PSSession", , $($FullCLR -or $CoreWindows -or $CoreUnix) -"Cmdlet", "Get-PSSessionCapability", , $($FullCLR -or $CoreWindows -or $CoreUnix) -"Cmdlet", "Get-PSSessionConfiguration", , $($FullCLR -or $CoreWindows -or $CoreUnix) +"Cmdlet", "Get-PSSessionCapability", , $($FullCLR -or $CoreWindows ) +"Cmdlet", "Get-PSSessionConfiguration", , $($FullCLR -or $CoreWindows ) "Cmdlet", "Get-PSSnapin", , $($FullCLR ) "Cmdlet", "Get-Random", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "Get-Runspace", , $($FullCLR -or $CoreWindows -or $CoreUnix) @@ -333,8 +333,8 @@ Describe "Verify approved aliases list" -Tags "CI" { "Cmdlet", "New-PSDrive", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "New-PSRoleCapabilityFile", , $( $CoreWindows -or $CoreUnix) "Cmdlet", "New-PSSession", , $($FullCLR -or $CoreWindows -or $CoreUnix) -"Cmdlet", "New-PSSessionConfigurationFile", , $($FullCLR -or $CoreWindows -or $CoreUnix) -"Cmdlet", "New-PSSessionOption", , $($FullCLR -or $CoreWindows -or $CoreUnix) +"Cmdlet", "New-PSSessionConfigurationFile", , $($FullCLR -or $CoreWindows ) +"Cmdlet", "New-PSSessionOption", , $($FullCLR -or $CoreWindows ) "Cmdlet", "New-PSTransportOption", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "New-Service", , $($FullCLR -or $CoreWindows ) "Cmdlet", "New-TemporaryFile", , $( $CoreWindows -or $CoreUnix) @@ -357,11 +357,11 @@ Describe "Verify approved aliases list" -Tags "CI" { "Cmdlet", "Push-Location", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "Read-Host", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "Receive-Job", , $($FullCLR -or $CoreWindows -or $CoreUnix) -"Cmdlet", "Receive-PSSession", , $($FullCLR -or $CoreWindows -or $CoreUnix) +"Cmdlet", "Receive-PSSession", , $($FullCLR -or $CoreWindows ) "Cmdlet", "Register-ArgumentCompleter", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "Register-EngineEvent", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "Register-ObjectEvent", , $($FullCLR -or $CoreWindows -or $CoreUnix) -"Cmdlet", "Register-PSSessionConfiguration", , $($FullCLR -or $CoreWindows -or $CoreUnix) +"Cmdlet", "Register-PSSessionConfiguration", , $($FullCLR -or $CoreWindows ) "Cmdlet", "Register-WmiEvent", , $($FullCLR ) "Cmdlet", "Remove-Computer", , $($FullCLR ) "Cmdlet", "Remove-Event", , $($FullCLR -or $CoreWindows -or $CoreUnix) @@ -406,7 +406,7 @@ Describe "Verify approved aliases list" -Tags "CI" { "Cmdlet", "Set-Location", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "Set-PSBreakpoint", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "Set-PSDebug", , $($FullCLR -or $CoreWindows -or $CoreUnix) -"Cmdlet", "Set-PSSessionConfiguration", , $($FullCLR -or $CoreWindows -or $CoreUnix) +"Cmdlet", "Set-PSSessionConfiguration", , $($FullCLR -or $CoreWindows ) "Cmdlet", "Set-Service", , $($FullCLR -or $CoreWindows ) "Cmdlet", "Set-StrictMode", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "Set-TimeZone", , $($FullCLR -or $CoreWindows ) @@ -439,14 +439,14 @@ Describe "Verify approved aliases list" -Tags "CI" { "Cmdlet", "Test-FileCatalog", , $($FullCLR -or $CoreWindows ) "Cmdlet", "Test-ModuleManifest", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "Test-Path", , $($FullCLR -or $CoreWindows -or $CoreUnix) -"Cmdlet", "Test-PSSessionConfigurationFile", , $($FullCLR -or $CoreWindows -or $CoreUnix) +"Cmdlet", "Test-PSSessionConfigurationFile", , $($FullCLR -or $CoreWindows ) "Cmdlet", "Test-WSMan", , $($FullCLR -or $CoreWindows ) "Cmdlet", "Trace-Command", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "Unblock-File", , $($FullCLR -or $CoreWindows ) "Cmdlet", "Undo-Transaction", , $($FullCLR ) "Cmdlet", "Unprotect-CmsMessage", , $($FullCLR -or $CoreWindows ) "Cmdlet", "Unregister-Event", , $($FullCLR -or $CoreWindows -or $CoreUnix) -"Cmdlet", "Unregister-PSSessionConfiguration", , $($FullCLR -or $CoreWindows -or $CoreUnix) +"Cmdlet", "Unregister-PSSessionConfiguration", , $($FullCLR -or $CoreWindows ) "Cmdlet", "Update-FormatData", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "Update-Help", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "Update-List", , $($FullCLR ) @@ -529,4 +529,4 @@ Describe "Verify approved aliases list" -Tags "CI" { It "Should have 'more' as a function" { Test-Path Function:more | Should Be $true } -} +} \ No newline at end of file From c1e1184884a5005a9c6824f311fea09e95a768de Mon Sep 17 00:00:00 2001 From: Chunqing Chen Date: Wed, 1 Nov 2017 13:56:59 -0700 Subject: [PATCH 2/3] adding new line EOF --- src/System.Management.Automation/engine/InitialSessionState.cs | 3 ++- test/powershell/engine/Basic/DefaultCommands.Tests.ps1 | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/System.Management.Automation/engine/InitialSessionState.cs b/src/System.Management.Automation/engine/InitialSessionState.cs index 72b61894174..77f2c15cd0b 100644 --- a/src/System.Management.Automation/engine/InitialSessionState.cs +++ b/src/System.Management.Automation/engine/InitialSessionState.cs @@ -5587,4 +5587,5 @@ internal class RunspaceEventSource : EventSource public void LoadCommandStart(string Name) { WriteEvent(25, Name); } public void LoadCommandStop(string Name) { WriteEvent(26, Name); } } -} \ No newline at end of file + +} diff --git a/test/powershell/engine/Basic/DefaultCommands.Tests.ps1 b/test/powershell/engine/Basic/DefaultCommands.Tests.ps1 index 5f5a8f0a041..5e0d8e62ae2 100644 --- a/test/powershell/engine/Basic/DefaultCommands.Tests.ps1 +++ b/test/powershell/engine/Basic/DefaultCommands.Tests.ps1 @@ -529,4 +529,5 @@ Describe "Verify approved aliases list" -Tags "CI" { It "Should have 'more' as a function" { Test-Path Function:more | Should Be $true } -} \ No newline at end of file + +} From ea3d8f6e2aa5d04cdf084f55323e989c76b96527 Mon Sep 17 00:00:00 2001 From: Chunqing Chen Date: Wed, 8 Nov 2017 07:00:44 -0800 Subject: [PATCH 3/3] [Feature] adding new line EOF --- src/System.Management.Automation/engine/InitialSessionState.cs | 1 - test/powershell/engine/Basic/DefaultCommands.Tests.ps1 | 1 - 2 files changed, 2 deletions(-) diff --git a/src/System.Management.Automation/engine/InitialSessionState.cs b/src/System.Management.Automation/engine/InitialSessionState.cs index 77f2c15cd0b..be2a77faa1a 100644 --- a/src/System.Management.Automation/engine/InitialSessionState.cs +++ b/src/System.Management.Automation/engine/InitialSessionState.cs @@ -5587,5 +5587,4 @@ internal class RunspaceEventSource : EventSource public void LoadCommandStart(string Name) { WriteEvent(25, Name); } public void LoadCommandStop(string Name) { WriteEvent(26, Name); } } - } diff --git a/test/powershell/engine/Basic/DefaultCommands.Tests.ps1 b/test/powershell/engine/Basic/DefaultCommands.Tests.ps1 index 5e0d8e62ae2..226143974cd 100644 --- a/test/powershell/engine/Basic/DefaultCommands.Tests.ps1 +++ b/test/powershell/engine/Basic/DefaultCommands.Tests.ps1 @@ -529,5 +529,4 @@ Describe "Verify approved aliases list" -Tags "CI" { It "Should have 'more' as a function" { Test-Path Function:more | Should Be $true } - }