mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
added tests to validate individual environmental variables
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
$expected = /bin/bash -c "cd ~ && pwd"
|
||||
|
||||
(Get-Item ENV:HOME).Value | Should Be $expected
|
||||
(Get-Item ENV:PATH).Value | Should Not BeNullOrEmpty
|
||||
}
|
||||
|
||||
It "Should be able to set the environment variables" {
|
||||
@@ -17,4 +16,18 @@
|
||||
$ENV:TESTENVIRONMENTVARIABLE | Should Be "this is a test environment variable"
|
||||
|
||||
}
|
||||
|
||||
It "Should contain /bin in the PATH" {
|
||||
$ENV:PATH | Should Match "/bin"
|
||||
}
|
||||
|
||||
It "Should have the correct HOSTNAME" {
|
||||
$expected = /bin/bash -c hostname
|
||||
|
||||
$ENV:HOSTNAME | Should Be $expected
|
||||
}
|
||||
|
||||
It "Should have a nonempty PATH" {
|
||||
$ENV:PATH | Should Not BeNullOrEmpty
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user