File size: 622 Bytes
8c763fb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
Describe "Pop-Location" -Tags "CI" {
    $startDirectory = $(Get-Location).Path

    BeforeEach { Set-Location $startDirectory }

    It "Should be able to be called without error" {
	{ Pop-Location } | Should -Not -Throw
    }

    It "Should not take a parameter" {
	{ Pop-Location .. } | Should -Throw
    }

    It "Should be able pop multiple times" {
	Push-Location ..
	Push-Location ..
	Push-Location ..

	Pop-Location
	Pop-Location
	Pop-Location

	$(Get-Location).Path | Should -Be $startDirectory

    }

    Set-Location $startDirectory
}