mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Add Pester tests for calling native Linux commands for issue 138
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
Describe "NativeLinuxCommands" {
|
||||
It "Should return a type of System.Object for hostname cmdlet" {
|
||||
(hostname).GetType().BaseType | Should Be 'System.Object'
|
||||
(hostname).GetType().Name | Should Be String
|
||||
}
|
||||
|
||||
It "Should have not empty Name flags set for ps object" {
|
||||
ps | foreach-object { $_.ProcessName | Should Not BeNullOrEmpty }
|
||||
}
|
||||
|
||||
It "Should be able to call using the touch, cat, rm cmdlet" {
|
||||
{ touch /NativeLinuxCommandsTestFile } | Should Not Throw
|
||||
{ cat /NativeLinuxCommandsTestFile } | Should Not Throw
|
||||
{ rm /NativeLinuxCommandsTestFile } | Should Not Throw
|
||||
}
|
||||
|
||||
It "Should be able to call using the mkdir, ls, rm cmdlet" {
|
||||
{ mkdir /NativeLinuxCommandsTestFolder } | Should Not Throw
|
||||
{ ls /NativeLinuxCommandsTestFolder } | Should Not Throw
|
||||
{ rm /NativeLinuxCommandsTestFolder } | Should Not Throw
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user