Add tests for command name matching

This commit is contained in:
Andrew Schwartzmeyer
2016-06-03 14:18:00 -07:00
parent 5c4675c63f
commit c6960f0867
@@ -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
}
}