PowerShell/test/powershell/Get-Location.Tests.ps1
Andrew Schwartzmeyer bbebf2f76a Reorganize tests
- Pester source code moved to `test/Pester`, deleted `ext-src`.
- Pester tests (.ps1 files) moved to `test/powershell`
- xUnit tests (.cs files) moved to `test/csharp`
- Third-party script test moved to `test/shebang`
2016-01-14 17:00:06 -08:00

26 lines
657 B
PowerShell

Describe "Get-Location aka pwd" {
<#Dependencies:
pushd
popd
$HOME
#>
$winHome = 'C:\Users\v-zafolw'
$nixHome = '/home/zafolw'
BeforeEach {
pushd $HOME #on windows, this is c:\Users\XXXXX; for *nix, it's /home/XXXXX
}
AfterEach { popd }
It "Should list the output of the current working directory" {
(Get-Location).Path | Should Not BeNullOrEmpty
(Get-Location).Path | Should Be ($winHome -or $nixHome)
}
It "Should be able to use pwd the same way" {
(pwd).Path | Should Not BeNullOrEmpty
(pwd).Path | Should Be ($winHome -or $nixHome)
}
}