fixed typo

This commit is contained in:
Zachary Folwick 2015-07-15 16:27:53 -07:00
parent fffe79b751
commit 088335669d

View file

@ -3,26 +3,28 @@ $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
. "$here\$sut"
Describe "Test-Get-Content" {
<#
Dependencies:
1. mkdir
#>
It "Should throw an error on a directory " {
# also tests that -erroraction SilentlyContinue will work.
Get-Content $HOME -ErrorAction SilentlyContinue| Should Throw
cat $HOME -ErrorAction SilentlyContinue| Should Throw
gc $HOME -ErrorAction SilentlyContinue| Should Throw
Get-Content . -ErrorAction SilentlyContinue | Should Throw
cat . -ErrorAction SilentlyContinue | Should Throw
gc . -ErrorAction SilentlyContinue | Should Throw
type . -ErrorAction SilentlyContinue | Should Throw
}
It "Should deliver an array object when listing a file" {
(Get-Content -Path .\Test-Get-Content.Tests.ps1).GetType().BaseType.Name | Should Be "Array"
(Get-Content -Path .\Test-Get-Content.Tests.ps1)[0] |Should be "`$here = Split-Path -Parent `$MyInvocation.MyCommand.Path"
}
(Get-Content -Path .\Test-Get-Content.Tests.ps1)[0] |Should be "`$here = Split-Path -Parent `$MyInvocation.MyCommand.Path"
(gc -Path .\Test-Get-Content.Tests.ps1).GetType().BaseType.Name | Should Be "Array"
(gc -Path .\Test-Get-Content.Tests.ps1)[0] |Should be "`$here = Split-Path -Parent `$MyInvocation.MyCommand.Path"
(type -Path .\Test-Get-Content.Tests.ps1).GetType().BaseType.Name | Should Be "Array"
(type -Path .\Test-Get-Content.Tests.ps1)[0] |Should be "`$here = Split-Path -Parent `$MyInvocation.MyCommand.Path"
(cat -Path .\Test-Get-Content.Tests.ps1).GetType().BaseType.Name | Should Be "Array"
(cat -Path .\Test-Get-Content.Tests.ps1)[0] |Should be "`$here = Split-Path -Parent `$MyInvocation.MyCommand.Path"
It "Should support pipelines" {
}
}
}