mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
Rename IsCore to IsCoreCLR
This commit is contained in:
1 parent
9ba6ba359d
commit
41173a3b65
17 files changed
+33
-33
No files matched your search
@@ -19,7 +19,7 @@ Describe "PSVersionTable" {
|
||||
$PSVersionTable.GitCommitId | Should not match "powershell.version"
|
||||
}
|
||||
|
||||
It "Should have the correct edition" -Skip:(!$IsCore) {
|
||||
It "Should have the correct edition" -Skip:(!$IsCoreCLR) {
|
||||
$PSVersionTable["PSEdition"] | Should Be "PowerShellCore"
|
||||
}
|
||||
}
|
||||
@@ -471,7 +471,7 @@ Describe 'PositiveReturnSelfClassTypeFromMemberFunction Test' -Tags "CI" {
|
||||
}
|
||||
|
||||
Describe 'TestMultipleArguments Test' -Tags "CI" {
|
||||
if ( $IsCore ) { $maxCount = 14 } else { $maxCount = 16 }
|
||||
if ( $IsCoreCLR ) { $maxCount = 14 } else { $maxCount = 16 }
|
||||
for ($i = 0; $i -lt $maxCount; $i++)
|
||||
{
|
||||
$properties = $(for ($j = 0; $j -le $i; $j++) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if ( $IsCore ) {
|
||||
if ( $IsCoreCLR ) {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ Describe "Type accelerators" -Tags "DRT" {
|
||||
}
|
||||
|
||||
It "Can query type accelerators" {
|
||||
if ( $IsCore ) { $count = 80 } else { $count = 82 }
|
||||
if ( $IsCoreCLR ) { $count = 80 } else { $count = 82 }
|
||||
$TypeAccelerators.Count -gt $count | Should Be $true
|
||||
$TypeAccelerators['xml'] | Should Be ([System.Xml.XmlDocument])
|
||||
$TypeAccelerators['AllowNull'] | Should Be ([System.Management.Automation.AllowNullAttribute])
|
||||
|
||||
@@ -215,7 +215,7 @@ Describe "Line breakpoints on commands in multi-line pipelines" -tags 'Innerloop
|
||||
Context "COM TESTS" {
|
||||
# DRT for 133807 SetBreakpointWithShortPath
|
||||
BeforeAll {
|
||||
if ( $IsCore ) { return } # no COM on core
|
||||
if ( $IsCoreCLR ) { return } # no COM on core
|
||||
$scriptPath1 = Join-Path $TestDrive SBPShortPathBug133807.DRT.tmp.ps1
|
||||
$scriptPath1 = setup -f SBPShortPathBug133807.DRT.tmp.ps1 -content '
|
||||
1..3 |
|
||||
@@ -230,19 +230,19 @@ Describe "Line breakpoints on commands in multi-line pipelines" -tags 'Innerloop
|
||||
}
|
||||
|
||||
AfterAll {
|
||||
if ( $IsCore ) { return }
|
||||
if ( $IsCoreCLR ) { return }
|
||||
if ($breakpoints -ne $null) { $breakpoints | Remove-PSBreakpoint }
|
||||
}
|
||||
|
||||
It "Short path Breakpoint on line 1 hit count" -skip:$IsCore {
|
||||
It "Short path Breakpoint on line 1 hit count" -skip:$IsCoreCLR {
|
||||
$breakpoints[0].HitCount | Should Be 1
|
||||
}
|
||||
|
||||
It "Short path Breakpoint on line 2 hit count" -skip:$IsCore {
|
||||
It "Short path Breakpoint on line 2 hit count" -skip:$IsCoreCLR {
|
||||
$breakpoints[1].HitCount | Should Be 3
|
||||
}
|
||||
|
||||
It "Short path Breakpoint on line 3 hit count" -skip:$IsCore {
|
||||
It "Short path Breakpoint on line 3 hit count" -skip:$IsCoreCLR {
|
||||
$breakpoints[2].HitCount | Should Be 1
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if ($IsWindows -and !$IsCore) {
|
||||
if ($IsWindows -and !$IsCoreCLR) {
|
||||
#check to see whether we're running as admin in Windows...
|
||||
$windowsIdentity = [Security.Principal.WindowsIdentity]::GetCurrent()
|
||||
$windowsPrincipal = new-object 'Security.Principal.WindowsPrincipal' $windowsIdentity
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if ($IsWindows -and !$IsCore) {
|
||||
if ($IsWindows -and !$IsCoreCLR) {
|
||||
#check to see whether we're running as admin in Windows...
|
||||
$windowsIdentity = [Security.Principal.WindowsIdentity]::GetCurrent()
|
||||
$windowsPrincipal = new-object 'Security.Principal.WindowsPrincipal' $windowsIdentity
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if ($IsWindows -and !$IsCore) {
|
||||
if ($IsWindows -and !$IsCoreCLR) {
|
||||
#check to see whether we're running as admin in Windows...
|
||||
$windowsIdentity = [Security.Principal.WindowsIdentity]::GetCurrent()
|
||||
$windowsPrincipal = new-object 'Security.Principal.WindowsPrincipal' $windowsIdentity
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if ($IsWindows -and !$IsCore) {
|
||||
if ($IsWindows -and !$IsCoreCLR) {
|
||||
#check to see whether we're running as admin in Windows...
|
||||
$windowsIdentity = [Security.Principal.WindowsIdentity]::GetCurrent()
|
||||
$windowsPrincipal = new-object 'Security.Principal.WindowsPrincipal' $windowsIdentity
|
||||
|
||||
@@ -37,14 +37,14 @@ Describe "Invoke-Item" {
|
||||
$testfile = Join-Path $TestDrive testfile.txt
|
||||
}
|
||||
|
||||
It "Should invoke a text file without error" -Skip:($IsWindows -and $IsCore) {
|
||||
It "Should invoke a text file without error" -Skip:($IsWindows -and $IsCoreCLR) {
|
||||
$debugfn = NewProcessStartInfo "-noprofile ""``Invoke-Item $testfile`n" -RedirectStdIn
|
||||
$process = RunPowerShell $debugfn
|
||||
EnsureChildHasExited $process
|
||||
$process.ExitCode | Should Be 0
|
||||
}
|
||||
|
||||
It "Should throw not supported on Windows with .NET Core" -Skip:($IsLinux -or $IsOSX -or !$IsCore) {
|
||||
It "Should throw not supported on Windows with .NET Core" -Skip:($IsLinux -or $IsOSX -or !$IsCoreCLR) {
|
||||
{ Invoke-Item $testfile }| Should Throw "Operation is not supported on this platform."
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ Describe "Trace-Command" -tags "P1", "RI" {
|
||||
}
|
||||
|
||||
# LogicalOperationStack is not in .NET Core
|
||||
It "LogicalOperationStack works" -Skip:$IsCore {
|
||||
It "LogicalOperationStack works" -Skip:$IsCoreCLR {
|
||||
$keyword = "Trace_Command_ListenerOption_LogicalOperationStack_Foo"
|
||||
$stack = [System.Diagnostics.Trace]::CorrelationManager.LogicalOperationStack
|
||||
$stack.Push($keyword)
|
||||
@@ -25,7 +25,7 @@ Describe "Trace-Command" -tags "P1", "RI" {
|
||||
}
|
||||
|
||||
# GetStackTrace is not in .NET Core
|
||||
It "Callstack works" -Skip:$IsCore {
|
||||
It "Callstack works" -Skip:$IsCoreCLR {
|
||||
Trace-Command -Name * -Expression {echo Foo} -ListenerOption Callstack -FilePath $logfile
|
||||
$log = Get-Content $logfile | Where-Object {$_ -like "*Callstack= * System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)*"}
|
||||
$log.Count | Should BeGreaterThan 0
|
||||
|
||||
Reference in new issue
Block a user