mirror of
https://github.com/PowerShell/PowerShell.git
synced 2024-11-23 17:53:58 +08:00
Reorganize some engine tests to make it clean (#4551)
1. The individual test files (.ps1) in `/test/powershell/engine` are moved to the corresponding subfolders. 2. The test asset file `test/powershell/Common/TestTypeFile.ps1xml` is moved to `test/powershell/Common/engine/Api/assets/` so that it's next to the test that is using the file.
This commit is contained in:
parent
7ae955fa73
commit
e83fcca277
@ -65,7 +65,7 @@ Describe "TypeTable duplicate types in reused runspace InitialSessionState TypeT
|
||||
|
||||
BeforeAll {
|
||||
|
||||
$typeTable = [System.Management.Automation.Runspaces.TypeTable]::new([string[]](Join-Path $PSScriptRoot "../Common/TestTypeFile.ps1xml"))
|
||||
$typeTable = [System.Management.Automation.Runspaces.TypeTable]::new([string[]](Join-Path $PSScriptRoot "assets/TestTypeFile.ps1xml"))
|
||||
[initialsessionstate] $iss = [initialsessionstate]::Create()
|
||||
$iss.Types.Add($typeTable)
|
||||
[runspace] $rs1 = [runspacefactory]::CreateRunspace($iss)
|
||||
@ -98,7 +98,7 @@ Describe "TypeTable duplicate types in reused runspace InitialSessionState TypeT
|
||||
BeforeAll {
|
||||
|
||||
# Create default ISS and add shared TypeTable.
|
||||
$typeTable = [System.Management.Automation.Runspaces.TypeTable]::new([string[]](Join-Path $PSScriptRoot "../Common/TestTypeFile.ps1xml"))
|
||||
$typeTable = [System.Management.Automation.Runspaces.TypeTable]::new([string[]](Join-Path $PSScriptRoot "assets/TestTypeFile.ps1xml"))
|
||||
[initialsessionstate] $iss = [initialsessionstate]::CreateDefault2()
|
||||
$iss.Types.Add($typeTable)
|
||||
$iss.ThrowOnRunspaceOpenError = $true
|
Loading…
Reference in New Issue
Block a user