mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-25 03:07:14 +00:00
Based on standard practices, we need to have a copyright and license notice at the top of each source file. Removed existing copyrights and updated/added copyright notices for .h, .cpp, .cs, .ps1, and .psm1 files. Updated module manifests for consistency to have Author = "PowerShell" and Company = "Microsoft Corporation". Removed multiple line breaks. Separate PR coming to update contribution document for new source files: #6140 Manually reviewed each change. Fix #6073
29 lines
1.1 KiB
PowerShell
29 lines
1.1 KiB
PowerShell
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
# Licensed under the MIT License.
|
|
Describe "Resolve-Path returns proper path" -Tag "CI" {
|
|
It "Resolve-Path returns resolved paths" {
|
|
Resolve-Path $TESTDRIVE | Should be "$TESTDRIVE"
|
|
}
|
|
It "Resolve-Path handles provider qualified paths" {
|
|
$result = Resolve-Path Filesystem::$TESTDRIVE
|
|
$result.providerpath | should be "$TESTDRIVE"
|
|
}
|
|
It "Resolve-Path provides proper error on invalid location" {
|
|
try {
|
|
Resolve-Path $TESTDRIVE/this.directory.is.invalid -ea stop
|
|
throw "execution OK"
|
|
}
|
|
catch {
|
|
$_.fullyqualifiederrorid | should be "PathNotFound,Microsoft.PowerShell.Commands.ResolvePathCommand"
|
|
}
|
|
}
|
|
It "Resolve-Path -Path should return correct drive path" {
|
|
$result = Resolve-Path -Path "TestDrive:\\\\\"
|
|
($result.Path.TrimEnd('/\')) | Should Be "TestDrive:"
|
|
}
|
|
It "Resolve-Path -LiteralPath should return correct drive path" {
|
|
$result = Resolve-Path -LiteralPath "TestDrive:\\\\\"
|
|
($result.Path.TrimEnd('/\')) | Should Be "TestDrive:"
|
|
}
|
|
}
|