Files
PowerShell/test/powershell/NativeLinuxCommands.Tests.ps1
T

22 lines
768 B
PowerShell
Raw Normal View History

Describe "NativeLinuxCommands" {
It "Should return a type of System.Object for hostname cmdlet" {
2016-04-08 13:36:54 -07:00
(hostname).GetType().BaseType | Should Be 'System.Object'
(hostname).GetType().Name | Should Be String
}
It "Should have not empty Name flags set for ps object" {
2016-04-08 13:36:54 -07:00
Get-Process | foreach-object { $_.ProcessName | Should Not BeNullOrEmpty }
}
2016-04-08 13:36:54 -07:00
It "Should find Application grep" -Skip:$IsWindows {
(get-command grep).CommandType | Should Be Application
}
It "Should pipe to grep and get result" -Skip:$IsWindows {
2016-04-08 13:36:54 -07:00
"hello world" | grep hello | Should Be "hello world"
}
2016-04-08 13:36:54 -07:00
It "Should find Application touch" -Skip:$IsWindows {
(get-command touch).CommandType | Should Be Application
}
}