@@ -30,12 +30,13 @@ Describe 'Import-Yaml' {
3030 $pathParameter.IsMandatory | Should - BeTrue
3131 $pathParameter.Position | Should - Be 0
3232 $pathParameter.ValueFromPipeline | Should - BeTrue
33- $pathParameter.ValueFromPipelineByPropertyName | Should - BeTrue
33+ $pathParameter.ValueFromPipelineByPropertyName | Should - BeFalse
3434 $literalPathParameter.IsMandatory | Should - BeTrue
3535 $literalPathParameter.ValueFromPipeline | Should - BeFalse
3636 $literalPathParameter.ValueFromPipelineByPropertyName | Should - BeTrue
37- $command.Parameters [' Path' ].Aliases | Should - Contain ' FullName'
37+ $command.Parameters [' Path' ].Aliases | Should -Not - Contain ' FullName'
3838 $command.Parameters [' LiteralPath' ].Aliases | Should - Contain ' PSPath'
39+ $command.Parameters [' LiteralPath' ].Aliases | Should - Contain ' FullName'
3940 $command.OutputType.Type | Should - Contain ([object ])
4041 }
4142
@@ -262,15 +263,24 @@ Describe 'Import-Yaml' {
262263 (Import-Yaml - LiteralPath $path ).value | Should - Be ' literal'
263264 }
264265
265- It ' accepts FileInfo pipeline input through Path ' {
266- $path = Join-Path $TestDrive ' pipeline .yaml'
266+ It ' resolves FileInfo pipeline input literally ' {
267+ $path = Join-Path $TestDrive ' config[production] .yaml'
267268 [System.IO.File ]::WriteAllText($path , ' value: pipeline' )
268269
269270 $result = Get-Item - LiteralPath $path | Import-Yaml
270271
271272 $result.value | Should - Be ' pipeline'
272273 }
273274
275+ It ' resolves FullName pipeline properties literally' {
276+ $path = Join-Path $TestDrive ' full[name].yaml'
277+ [System.IO.File ]::WriteAllText($path , ' value: fullname' )
278+
279+ $result = [pscustomobject ]@ { FullName = $path } | Import-Yaml
280+
281+ $result.value | Should - Be ' fullname'
282+ }
283+
274284 It ' accepts PSPath pipeline properties through LiteralPath' {
275285 $path = Join-Path $TestDrive ' literal[2].yaml'
276286 [System.IO.File ]::WriteAllText($path , ' value: property' )
0 commit comments