mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Add-Type: add mscorlib.dll to the list of default references
Fix #1361 On CoreCLR 1.0.0 RTM the layout changed compare to RC2. This change accounts for it. This change also cleans up some left-overs for SecureString ref.
This commit is contained in:
1 parent
3ca8272d41
commit
3fd885ef2d
2 files changed
+35
-8
No files matched your search
@@ -1,5 +1,15 @@
|
||||
$guid = [Guid]::NewGuid().ToString().Replace("-","")
|
||||
|
||||
Describe "Add-Type" {
|
||||
It "Should not throw given a simple class definition" {
|
||||
{ Add-Type -TypeDefinition "public static class foo { }" } | Should Not Throw
|
||||
{ Add-Type -TypeDefinition "public static class foo { }" } | Should Not Throw
|
||||
}
|
||||
|
||||
It "Can use System.Management.Automation.CmdletAttribute" {
|
||||
$code = @"
|
||||
[System.Management.Automation.Cmdlet("Get", "Thing", ConfirmImpact = System.Management.Automation.ConfirmImpact.High, SupportsPaging = true)]
|
||||
public class AttributeTest$guid {}
|
||||
"@
|
||||
Add-Type -TypeDefinition $code -PassThru | Should Not Be $null
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user