MegaBites-AI/Windows-powershell
0372
1# Copyright (c) Microsoft Corporation.2# Licensed under the MIT License.3Describe "Pop-Location" -Tags "CI" {4 $startDirectory = $(Get-Location).Path5 6 BeforeEach { Set-Location $startDirectory }7 8 It "Should be able to be called without error" {9 { Pop-Location } | Should -Not -Throw10 }11 12 It "Should not take a parameter" {13 { Pop-Location .. } | Should -Throw14 }15 16 It "Should be able pop multiple times" {17 Push-Location ..18 Push-Location ..19 Push-Location ..20 21 Pop-Location22 Pop-Location23 Pop-Location24 25 $(Get-Location).Path | Should -Be $startDirectory26 27 }28 29 Set-Location $startDirectory30}31 