mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Add tests for command name matching
This commit is contained in:
1 parent
5c4675c63f
commit
c6960f0867
1 file changed
+21
@@ -16,3 +16,24 @@ Describe "NativeLinuxCommands" {
|
||||
(get-command touch).CommandType | Should Be Application
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Scripts with extensions" {
|
||||
BeforeAll {
|
||||
$data = "Hello World"
|
||||
Setup -File testScript.ps1 -Content "'$data'"
|
||||
$originalPath = $env:PATH
|
||||
$env:PATH += [IO.Path]::PathSeparator + $TestDrive
|
||||
}
|
||||
|
||||
AfterAll {
|
||||
$env:PATH = $originalPath
|
||||
}
|
||||
|
||||
It "Should run a script with its full name" {
|
||||
testScript.ps1 | Should Be $data
|
||||
}
|
||||
|
||||
It "Should run a script with its short name" {
|
||||
testScript | Should Be $data
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user