mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
Update Pester test for calling native Linux commands for isssue 138
This commit is contained in:
1 parent
73fa64c350
commit
bf80880b51
1 file changed
+16
-8
@@ -8,15 +8,23 @@ Describe "NativeLinuxCommands" {
|
||||
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 find Application grep" -Skip:$IsWindows {
|
||||
(get-command grep).CommandType | Should Be Application
|
||||
}
|
||||
|
||||
It "Should pipe to grep and get result" -Skip:$IsWindows {
|
||||
"hello world" | grep hello | Should Be "hello world"
|
||||
}
|
||||
|
||||
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
|
||||
It "Should find Application touch" -Skip:$IsWindows {
|
||||
(get-command touch).CommandType | Should Be Application
|
||||
}
|
||||
|
||||
It "Should find Alias ls" -Skip:$IsWindows {
|
||||
(get-command ls).CommandType | Should Be Alias
|
||||
}
|
||||
|
||||
It "Should find Function mkdir" -Skip:$IsWindows {
|
||||
(get-command mkdir).CommandType | Should Be Function
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user