fixed typo
This commit is contained in:
parent
fffe79b751
commit
088335669d
|
@ -3,26 +3,28 @@ $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
|
||||||
. "$here\$sut"
|
. "$here\$sut"
|
||||||
|
|
||||||
Describe "Test-Get-Content" {
|
Describe "Test-Get-Content" {
|
||||||
<#
|
|
||||||
Dependencies:
|
|
||||||
1. mkdir
|
|
||||||
#>
|
|
||||||
It "Should throw an error on a directory " {
|
It "Should throw an error on a directory " {
|
||||||
# also tests that -erroraction SilentlyContinue will work.
|
# also tests that -erroraction SilentlyContinue will work.
|
||||||
|
|
||||||
Get-Content $HOME -ErrorAction SilentlyContinue| Should Throw
|
Get-Content . -ErrorAction SilentlyContinue | Should Throw
|
||||||
cat $HOME -ErrorAction SilentlyContinue| Should Throw
|
cat . -ErrorAction SilentlyContinue | Should Throw
|
||||||
gc $HOME -ErrorAction SilentlyContinue| Should Throw
|
gc . -ErrorAction SilentlyContinue | Should Throw
|
||||||
|
type . -ErrorAction SilentlyContinue | Should Throw
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
It "Should deliver an array object when listing a file" {
|
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).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" {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue