+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// TextWriter to write to.
+ /// MarkdownOptionInfo object with options.
+ public VT100Renderer(TextWriter writer, MarkdownOptionInfo optionInfo) : base(writer)
+ {
+ EscapeSequences = new VT100EscapeSequences(optionInfo);
+
+ // Add the various element renderers.
+ ObjectRenderers.Add(new HeaderBlockRenderer());
+ ObjectRenderers.Add(new LineBreakRenderer());
+ ObjectRenderers.Add(new CodeInlineRenderer());
+ ObjectRenderers.Add(new FencedCodeBlockRenderer());
+ ObjectRenderers.Add(new EmphasisInlineRenderer());
+ ObjectRenderers.Add(new ParagraphBlockRenderer());
+ ObjectRenderers.Add(new LeafInlineRenderer());
+ ObjectRenderers.Add(new LinkInlineRenderer());
+ ObjectRenderers.Add(new ListBlockRenderer());
+ ObjectRenderers.Add(new ListItemBlockRenderer());
+ ObjectRenderers.Add(new QuoteBlockRenderer());
+ }
+
+ ///
+ /// Gets the current escape sequences.
+ ///
+ public VT100EscapeSequences EscapeSequences { get; private set; }
+ }
+}
diff --git a/src/Modules/Unix/Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psd1 b/src/Modules/Unix/Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psd1
index 5adfcf86bc..15d23791fe 100644
--- a/src/Modules/Unix/Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psd1
+++ b/src/Modules/Unix/Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psd1
@@ -24,7 +24,7 @@ CmdletsToExport= "Format-List", "Format-Custom", "Format-Table", "Format-Wide",
"Send-MailMessage", "Get-TraceSource", "Set-TraceSource", "Trace-Command", "Get-FileHash",
"Get-Runspace", "Debug-Runspace", "Enable-RunspaceDebug", "Disable-RunspaceDebug",
"Get-RunspaceDebug", "Wait-Debugger" , "Get-Uptime", "New-TemporaryFile", "Get-Verb", "Format-Hex",
- "Test-Json", "Remove-Alias"
+ "Test-Json", "Remove-Alias", "ConvertFrom-Markdown", "Show-Markdown", "Set-MarkdownOption", "Get-MarkdownOption"
FunctionsToExport= "Import-PowerShellDataFile"
AliasesToExport= "fhx"
NestedModules="Microsoft.PowerShell.Commands.Utility.dll","Microsoft.PowerShell.Utility.psm1"
diff --git a/src/Modules/Windows/Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psd1 b/src/Modules/Windows/Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psd1
index d427680156..b33a5b3b0d 100644
--- a/src/Modules/Windows/Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psd1
+++ b/src/Modules/Windows/Microsoft.PowerShell.Utility/Microsoft.PowerShell.Utility.psd1
@@ -24,7 +24,7 @@ CmdletsToExport= "Format-List", "Format-Custom", "Format-Table", "Format-Wide",
"Send-MailMessage", "Get-TraceSource", "Set-TraceSource", "Trace-Command", "Get-FileHash",
"Unblock-File", "Get-Runspace", "Debug-Runspace", "Enable-RunspaceDebug", "Disable-RunspaceDebug",
"Get-RunspaceDebug", "Wait-Debugger" , "Get-Uptime", "Get-Verb", "Format-Hex",
- "Test-Json", "Remove-Alias"
+ "Test-Json", "Remove-Alias", "ConvertFrom-Markdown", "Show-Markdown", "Set-MarkdownOption", "Get-MarkdownOption"
FunctionsToExport= "ConvertFrom-SddlString"
AliasesToExport= "fhx"
NestedModules="Microsoft.PowerShell.Commands.Utility.dll","Microsoft.PowerShell.Utility.psm1"
diff --git a/src/System.Management.Automation/engine/TypesV3_Ps1Xml.cs b/src/System.Management.Automation/engine/TypesV3_Ps1Xml.cs
index e12ad850a5..46c152f83b 100644
--- a/src/System.Management.Automation/engine/TypesV3_Ps1Xml.cs
+++ b/src/System.Management.Automation/engine/TypesV3_Ps1Xml.cs
@@ -114,6 +114,31 @@ namespace System.Management.Automation.Runspaces
var td15 = new TypeData(@"Deserialized.System.Management.Automation.DebuggerStopEventArgs", true);
td15.TargetTypeForDeserialization = typeof(Microsoft.PowerShell.DeserializingTypeConverter);
yield return td15;
+
+ var td16 = new TypeData(@"Microsoft.PowerShell.MarkdownRender.MarkdownOptionInfo");
+ td16.Members.Add("Header1",
+ new ScriptPropertyData(@"Header1", GetScriptBlock(@"$this.AsEscapeSequence('Header1')"), setScriptBlock: null));
+ td16.Members.Add("Header2",
+ new ScriptPropertyData(@"Header2", GetScriptBlock(@"$this.AsEscapeSequence('Header2')"), setScriptBlock: null));
+ td16.Members.Add("Header3",
+ new ScriptPropertyData(@"Header3", GetScriptBlock(@"$this.AsEscapeSequence('Header3')"), setScriptBlock: null));
+ td16.Members.Add("Header4",
+ new ScriptPropertyData(@"Header4", GetScriptBlock(@"$this.AsEscapeSequence('Header4')"), setScriptBlock: null));
+ td16.Members.Add("Header5",
+ new ScriptPropertyData(@"Header5", GetScriptBlock(@"$this.AsEscapeSequence('Header5')"), setScriptBlock: null));
+ td16.Members.Add("Header6",
+ new ScriptPropertyData(@"Header6", GetScriptBlock(@"$this.AsEscapeSequence('Header6')"), setScriptBlock: null));
+ td16.Members.Add("Code",
+ new ScriptPropertyData(@"Code", GetScriptBlock(@"$this.AsEscapeSequence('Code')"), setScriptBlock: null));
+ td16.Members.Add("Link",
+ new ScriptPropertyData(@"Link", GetScriptBlock(@"$this.AsEscapeSequence('Link')"), setScriptBlock: null));
+ td16.Members.Add("Image",
+ new ScriptPropertyData(@"Image", GetScriptBlock(@"$this.AsEscapeSequence('Image')"), setScriptBlock: null));
+ td16.Members.Add("EmphasisBold",
+ new ScriptPropertyData(@"EmphasisBold", GetScriptBlock(@"$this.AsEscapeSequence('EmphasisBold')"), setScriptBlock: null));
+ td16.Members.Add("EmphasisItalics",
+ new ScriptPropertyData(@"EmphasisItalics", GetScriptBlock(@"$this.AsEscapeSequence('EmphasisItalics')"), setScriptBlock: null));
+ yield return td16;
}
}
}
diff --git a/src/System.Management.Automation/engine/Utils.cs b/src/System.Management.Automation/engine/Utils.cs
index 2cc4b9602c..d17e04fd33 100644
--- a/src/System.Management.Automation/engine/Utils.cs
+++ b/src/System.Management.Automation/engine/Utils.cs
@@ -1449,6 +1449,8 @@ namespace System.Management.Automation.Internal
internal static bool StopwatchIsNotHighResolution;
internal static bool DisableGACLoading;
+ internal static bool ShowMarkdownOutputBypass;
+
/// This member is used for internal test purposes.
public static void SetTestHook(string property, object value)
{
diff --git a/src/powershell-native/nativemsh/pwrshcommon/pwrshcommon.cpp b/src/powershell-native/nativemsh/pwrshcommon/pwrshcommon.cpp
index abb8c60ca1..79344c6bef 100644
--- a/src/powershell-native/nativemsh/pwrshcommon/pwrshcommon.cpp
+++ b/src/powershell-native/nativemsh/pwrshcommon/pwrshcommon.cpp
@@ -682,7 +682,6 @@ namespace NativeMsh
"Microsoft.PowerShell.Commands.Utility",
"Microsoft.PowerShell.ConsoleHost",
"Microsoft.PowerShell.CoreCLR.Eventing",
- "Microsoft.PowerShell.MarkdownRender",
"Microsoft.PowerShell.SDK",
"Microsoft.PowerShell.Security",
"Microsoft.VisualBasic",
diff --git a/test/powershell/Modules/Microsoft.PowerShell.Utility/MarkdownCmdlets.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Utility/MarkdownCmdlets.Tests.ps1
new file mode 100644
index 0000000000..ac568ba6aa
--- /dev/null
+++ b/test/powershell/Modules/Microsoft.PowerShell.Utility/MarkdownCmdlets.Tests.ps1
@@ -0,0 +1,339 @@
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License.
+
+Describe 'ConvertFrom-Markdown tests' -Tags 'CI' {
+
+ BeforeAll {
+ $esc = [char]0x1b
+
+ function GetExpectedString
+ {
+ [CmdletBinding()]
+ param(
+ [ValidateSet(
+ "Header1", "Header2", "Header3", "Header4", "Header5", "Header6",
+ "Code", "CodeBlock",
+ "Link", "Image",
+ "Bold", "Italics")]
+ [Parameter()]
+ [string] $ElementType,
+
+ [string] $Text,
+
+ [string] $CodeFormatString,
+
+ [string] $CodeText
+ )
+
+ switch($elementType)
+ {
+ "Header1" { "$esc[7m$text$esc[0m`n`n" }
+ "Header2" { "$esc[4;93m$text$esc[0m`n`n" }
+ "Header3" { "$esc[4;94m$text$esc[0m`n`n" }
+ "Header4" { "$esc[4;95m$text$esc[0m`n`n" }
+ "Header5" { "$esc[4;96m$text$esc[0m`n`n" }
+ "Header6" { "$esc[4;97m$text$esc[0m`n`n" }
+
+ "Code" { ($CodeFormatString -f "$esc[48;2;155;155;155;38;2;30;30;30m$CodeText$esc[0m") + "`n`n" }
+ "CodeBlock" {
+ $expectedString = @()
+ $CodeText -split "`n" | ForEach-Object { $expectedString += "$esc[48;2;155;155;155;38;2;30;30;30m$_$esc[500@$esc[0m" }
+ $returnString = $expectedString -join "`n"
+ "$returnString`n`n"
+ }
+
+ "Link" { "$esc[4;38;5;117m`"$text`"$esc[0m`n" }
+ "Image" { "$esc[33m[$text]$esc[0m`n" }
+ "Bold" { "$esc[1m$text$esc[0m`n" }
+ "Italics" { "$esc[36m$text$esc[0m`n" }
+ }
+ }
+
+ function GetExpectedHTML
+ {
+ [CmdletBinding()]
+ param(
+ [ValidateSet(
+ "Header1", "Header2", "Header3", "Header4", "Header5", "Header6",
+ "Code", "CodeBlock",
+ "Link", "Image",
+ "Bold", "Italics")]
+ [Parameter()]
+ [string] $ElementType,
+
+ [string] $Text,
+
+ [string] $Url,
+
+ [string] $CodeFormatString,
+
+ [string] $CodeText
+ )
+
+ $id = $Text.Replace(" ","-").ToLowerInvariant()
+
+ switch($elementType)
+ {
+ "Header1" { "$text
`n" }
+ "Header2" { "$text
`n" }
+ "Header3" { "$text
`n" }
+ "Header4" { "$text
`n" }
+ "Header5" { "$text
`n" }
+ "Header6" { "$text
`n" }
+
+ "Code" { "" + ($CodeFormatString -f "$CodeText") + "
`n" }
+ "CodeBlock" { "$CodeText`n
`n" }
+
+ "Link" { "$text
`n" }
+ "Image" { "
`n" }
+ "Bold" { "$text
`n" }
+ "Italics" { "$text
`n" }
+ }
+ }
+ }
+
+ Context 'Basic tests' {
+ BeforeAll {
+ $esc = [char]0x1b
+ $mdFile = New-Item -Path $TestDrive/input.md -Value "Some **test string** to write in a file" -Force
+ $mdLiteralPath = New-Item -Path $TestDrive/LiteralPath.md -Value "Some **test string** to write in a file" -Force
+ $expectedStringFromFile = "Some $esc[1mtest string$esc[0m to write in a file`n`n"
+
+ $codeBlock = @'
+```
+bool function()
+{
+}
+```
+'@
+
+ $codeBlockText = @"
+bool function()`n{`n}
+"@
+
+ $TestCases = @(
+ @{ element = 'Header1'; InputMD = '# Header 1'; Text = 'Header 1' }
+ @{ element = 'Header2'; InputMD = '## Header 2'; Text = 'Header 2' }
+ @{ element = 'Header3'; InputMD = '### Header 3'; Text = 'Header 3' }
+ @{ element = 'Header4'; InputMD = '#### Header 4'; Text = 'Header 4' }
+ @{ element = 'Header5'; InputMD = '##### Header 5'; Text = 'Header 5' }
+ @{ element = 'Header6'; InputMD = '###### Header 6'; Text = 'Header 6' }
+ @{ element = 'Code'; InputMD = 'This is a `code` sample'; CodeFormatString = 'This is a {0} sample'; CodeText = 'code'}
+ @{ element = 'CodeBlock'; InputMD = $codeBlock; CodeText = $codeBlockText }
+ @{ element = 'Link'; InputMD = '[GitHub](https://www.github.com)'; Text = 'GitHub'; Url = 'https://www.github.com'}
+ @{ element = 'Image'; InputMD = ''; Text = 'alt-text'; Url = 'https://bing.com/ps.svg'}
+ @{ element = 'Bold'; InputMD = '**bold text**'; Text = 'bold text' }
+ @{ element = 'Italics'; InputMD = '*italics text*'; Text = 'italics text' }
+ )
+ }
+
+
+ It 'Can convert element : to vt100 using pipeline input' -TestCases $TestCases {
+ param($element, $inputMD, $text, $codeFormatString, $codeText)
+
+ $output = $inputMD | ConvertFrom-Markdown -AsVT100EncodedString
+
+ if($element -like 'Header?' -or
+ $element -eq 'Link' -or
+ $element -eq 'Image' -or
+ $element -eq 'Bold' -or
+ $element -eq 'Italics')
+ {
+ $expectedString = GetExpectedString -ElementType $element -Text $text
+ }
+ elseif($element -eq 'Code')
+ {
+ $expectedString = GetExpectedString -ElementType $element -CodeFormatString $codeFormatString -CodeText $codeText
+ }
+ elseif($element -eq 'CodeBlock')
+ {
+ $expectedString = GetExpectedString -ElementType $element -CodeText $codeText
+ }
+
+ $output.VT100EncodedString | Should -BeExactly $expectedString
+ }
+
+ It 'Can convert element : to HTML using pipeline input' -TestCases $TestCases {
+ param($element, $inputMD, $text, $codeFormatString, $codeText, $url)
+
+ $output = $inputMD | ConvertFrom-Markdown
+
+ if($element -like 'Header?' -or
+ $element -eq 'Bold' -or
+ $element -eq 'Italics')
+ {
+ $expectedString = GetExpectedHTML -ElementType $element -Text $text
+ }
+ elseif($element -eq 'Code')
+ {
+ $expectedString = GetExpectedHTML -ElementType $element -CodeFormatString $codeFormatString -CodeText $codeText
+ }
+ elseif($element -eq 'CodeBlock')
+ {
+ $expectedString = GetExpectedHTML -ElementType $element -CodeText $codeText
+ }
+ elseif ($element -eq 'Link')
+ {
+ $expectedString = GetExpectedHTML -ElementType $element -Text $text -Url $url
+ }
+ elseif ($element -eq 'Image')
+ {
+ $expectedString = GetExpectedHTML -ElementType $element -Text $text -Url $url
+ }
+
+ $output.Html | Should -BeExactly $expectedString
+ }
+
+ It 'Can convert input from a file path to vt100 encoded string' {
+ $output = ConvertFrom-Markdown -Path $mdFile.FullName -AsVT100EncodedString
+ $output.VT100EncodedString | Should -BeExactly $expectedStringFromFile
+ }
+
+ It 'Can convert input from a fileinfo object to vt100 encoded string' {
+ $ouputFromFileInfo = $mdFile | ConvertFrom-Markdown -AsVT100EncodedString
+ $ouputFromFileInfo.VT100EncodedString | Should -BeExactly $expectedStringFromFile
+ }
+
+ It 'Can convert input from a literal path to vt100 encoded string' {
+ $output = ConvertFrom-Markdown -Path $mdLiteralPath -AsVT100EncodedString
+ $output.VT100EncodedString | Should -BeExactly $expectedStringFromFile
+ }
+ }
+
+ Context "ConvertFrom-Markdown error cases" {
+ It "Gets an error if path is not FileSystem provider path" {
+ { ConvertFrom-Markdown -Path Env:\PSModulePath -ErrorAction Stop } | Should -Throw -ErrorId 'OnlyFileSystemPathsSupported,Microsoft.PowerShell.Commands.ConvertFromMarkdownCommand'
+ }
+
+ It "Gets an error if path does not exist" {
+ { ConvertFrom-Markdown -Path DoestnotExist -ErrorAction Stop } | Should -Throw -ErrorId 'FileNotFound,Microsoft.PowerShell.Commands.ConvertFromMarkdownCommand'
+ }
+
+ It "Gets an error if input object type is not correct" {
+ { ConvertFrom-Markdown -InputObject 1 -ErrorAction Stop } | Should -Throw -ErrorId 'InvalidInputObject,Microsoft.PowerShell.Commands.ConvertFromMarkdownCommand'
+ }
+
+ It "Gets an error if input file does not exist" {
+ { [System.IO.FileInfo]::new("IDoNoExist") | ConvertFrom-Markdown -ErrorAction Stop } | Should -Throw -ErrorId 'FileNotFound,Microsoft.PowerShell.Commands.ConvertFromMarkdownCommand'
+ }
+ }
+
+ Context "Get/Set-MarkdownOption tests" {
+
+ BeforeAll {
+ $esc = [char]0x1b
+ }
+
+ BeforeEach {
+ $originalOptions = Get-MarkdownOption
+ }
+
+ AfterEach {
+ Set-MarkdownOption -InputObject $originalOptions
+ }
+
+ It "Verify default values for MarkdownOptions" {
+ $options = Get-MarkdownOption
+
+ $options.Header1 | Should -BeExactly "$esc[7m[7m$esc[0m"
+ $options.Header2 | Should -BeExactly "$esc[4;93m[4;93m$esc[0m"
+ $options.Header3 | Should -BeExactly "$esc[4;94m[4;94m$esc[0m"
+ $options.Header4 | Should -BeExactly "$esc[4;95m[4;95m$esc[0m"
+ $options.Header5 | Should -BeExactly "$esc[4;96m[4;96m$esc[0m"
+ $options.Header6 | Should -BeExactly "$esc[4;97m[4;97m$esc[0m"
+ $options.Code | Should -BeExactly "$esc[48;2;155;155;155;38;2;30;30;30m[48;2;155;155;155;38;2;30;30;30m$esc[0m"
+ $options.Link | Should -BeExactly "$esc[4;38;5;117m[4;38;5;117m$esc[0m"
+ $options.Image | Should -BeExactly "$esc[33m[33m$esc[0m"
+ $options.EmphasisBold | Should -BeExactly "$esc[1m[1m$esc[0m"
+ $options.EmphasisItalics | Should -BeExactly "$esc[36m[36m$esc[0m"
+ }
+
+ It "Verify Set-MarkdownOption can get options" {
+ Set-MarkdownOption `
+ -Header1Color "[4;1m" `
+ -Header2Color "[93m" `
+ -Header3Color "[94m" `
+ -Header4Color "[95m" `
+ -Header5Color "[96m" `
+ -Header6Color "[97m" `
+ -ImageAltTextForegroundColor "[34m" `
+ -LinkForegroundColor "[4;38;5;88m" `
+ -ItalicsForegroundColor "[35m" `
+ -BoldForegroundColor "[32m"
+
+ $newOptions = Get-MarkdownOption
+
+ $newOptions.Header1 | Should -BeExactly "$esc[4;1m[4;1m$esc[0m"
+ $newOptions.Header2 | Should -BeExactly "$esc[93m[93m$esc[0m"
+ $newOptions.Header3 | Should -BeExactly "$esc[94m[94m$esc[0m"
+ $newOptions.Header4 | Should -BeExactly "$esc[95m[95m$esc[0m"
+ $newOptions.Header5 | Should -BeExactly "$esc[96m[96m$esc[0m"
+ $newOptions.Header6 | Should -BeExactly "$esc[97m[97m$esc[0m"
+ #$options.Code | Should -BeExactly "$esc[48;2;155;155;155;38;2;30;30;30m[48;2;155;155;155;38;2;30;30;30m$esc[0m"
+ $newOptions.Link | Should -BeExactly "$esc[4;38;5;88m[4;38;5;88m$esc[0m"
+ $newOptions.Image | Should -BeExactly "$esc[34m[34m$esc[0m"
+ $newOptions.EmphasisBold | Should -BeExactly "$esc[32m[32m$esc[0m"
+ $newOptions.EmphasisItalics | Should -BeExactly "$esc[35m[35m$esc[0m"
+ }
+
+ It "Verify defaults for light theme" {
+ Set-MarkdownOption -Theme Light
+ $options = Get-MarkdownOption
+
+ $options.Header1 | Should -BeExactly "$esc[7m[7m$esc[0m"
+ $options.Header2 | Should -BeExactly "$esc[4;33m[4;33m$esc[0m"
+ $options.Header3 | Should -BeExactly "$esc[4;34m[4;34m$esc[0m"
+ $options.Header4 | Should -BeExactly "$esc[4;35m[4;35m$esc[0m"
+ $options.Header5 | Should -BeExactly "$esc[4;36m[4;36m$esc[0m"
+ $options.Header6 | Should -BeExactly "$esc[4;30m[4;30m$esc[0m"
+ $options.Code | Should -BeExactly "$esc[48;2;155;155;155;38;2;30;30;30m[48;2;155;155;155;38;2;30;30;30m$esc[0m"
+ $options.Link | Should -BeExactly "$esc[4;38;5;117m[4;38;5;117m$esc[0m"
+ $options.Image | Should -BeExactly "$esc[33m[33m$esc[0m"
+ $options.EmphasisBold | Should -BeExactly "$esc[1m[1m$esc[0m"
+ $options.EmphasisItalics | Should -BeExactly "$esc[36m[36m$esc[0m"
+ }
+ }
+
+ Context "Show-Markdown tests" {
+ BeforeEach {
+ [System.Management.Automation.Internal.InternalTestHooks]::SetTestHook("ShowMarkdownOutputBypass", $true)
+ }
+
+ AfterEach {
+ [System.Management.Automation.Internal.InternalTestHooks]::SetTestHook("ShowMarkdownOutputBypass", $false)
+ }
+
+ It "can show VT100 converted from markdown" {
+ $text = "Bold"
+ $mdText = "**$text**"
+ $expectedString = GetExpectedString -ElementType 'Bold' -Text $text
+
+ $result = $mdText | ConvertFrom-Markdown -AsVT100EncodedString | Show-Markdown
+ $result | Should -BeExactly $expectedString
+ }
+
+ It "can show HTML converted from markdown" {
+ $text = "Bold"
+ $mdText = "**$text**"
+ $expectedString = GetExpectedHTML -ElementType 'Bold' -Text $text
+
+ $result = $mdText | ConvertFrom-Markdown | Show-Markdown -UseBrowser
+ $result | Should -BeExactly $expectedString
+ }
+
+ It "Gets an error if the input object is missing the property." -TestCases @(@{propertyname = 'Html'}, @{propertyname = 'VT100EncodedString'}) {
+ param($propertyname)
+
+ $markdownInfo = [Microsoft.PowerShell.MarkdownRender.MarkdownInfo]::new()
+
+ if($propertyname -eq 'VT100EncodedString')
+ {
+ { Show-Markdown -InputObject $markdownInfo -ErrorAction Stop } | Should -Throw -ErrorId 'VT100EncodedStringIsNullOrEmpty,Microsoft.PowerShell.Commands.ShowMarkdownCommand'
+ }
+ else
+ {
+ { Show-Markdown -UseBrowser -InputObject $markdownInfo -ErrorAction Stop } | Should -Throw -ErrorId 'HtmlIsNullOrEmpty,Microsoft.PowerShell.Commands.ShowMarkdownCommand'
+ }
+ }
+ }
+}
diff --git a/test/powershell/engine/Basic/DefaultCommands.Tests.ps1 b/test/powershell/engine/Basic/DefaultCommands.Tests.ps1
index 0fcdef96c7..cc60c28641 100644
--- a/test/powershell/engine/Basic/DefaultCommands.Tests.ps1
+++ b/test/powershell/engine/Basic/DefaultCommands.Tests.ps1
@@ -191,6 +191,7 @@ Describe "Verify approved aliases list" -Tags "CI" {
"Cmdlet", "Connect-WSMan", , $($FullCLR -or $CoreWindows )
"Cmdlet", "ConvertFrom-Csv", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "ConvertFrom-Json", , $($FullCLR -or $CoreWindows -or $CoreUnix)
+"Cmdlet", "ConvertFrom-Markdown", , $($CoreWindows -or $CoreUnix)
"Cmdlet", "ConvertFrom-SecureString", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "ConvertFrom-String", , $($FullCLR )
"Cmdlet", "ConvertFrom-StringData", , $($FullCLR -or $CoreWindows -or $CoreUnix)
@@ -270,6 +271,7 @@ Describe "Verify approved aliases list" -Tags "CI" {
"Cmdlet", "Get-ItemPropertyValue", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Get-Job", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Get-Location", , $($FullCLR -or $CoreWindows -or $CoreUnix)
+"Cmdlet", "Get-MarkdownOption", , $($CoreWindows -or $CoreUnix)
"Cmdlet", "Get-Member", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Get-Module", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Get-PfxCertificate", , $($FullCLR -or $CoreWindows -or $CoreUnix)
@@ -408,6 +410,7 @@ Describe "Verify approved aliases list" -Tags "CI" {
"Cmdlet", "Set-Item", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Set-ItemProperty", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Set-Location", , $($FullCLR -or $CoreWindows -or $CoreUnix)
+"Cmdlet", "Set-MarkdownOption", , $($CoreWindows -or $CoreUnix)
"Cmdlet", "Set-PSBreakpoint", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Set-PSDebug", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Set-PSSessionConfiguration", , $($FullCLR -or $CoreWindows )
@@ -422,6 +425,7 @@ Describe "Verify approved aliases list" -Tags "CI" {
"Cmdlet", "Show-Command", , $($FullCLR )
"Cmdlet", "Show-ControlPanelItem", , $($FullCLR )
"Cmdlet", "Show-EventLog", , $($FullCLR )
+"Cmdlet", "Show-Markdown", , $($CoreWindows -or $CoreUnix)
"Cmdlet", "Sort-Object", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Split-Path", , $($FullCLR -or $CoreWindows -or $CoreUnix)
"Cmdlet", "Start-Job", , $($FullCLR -or $CoreWindows -or $CoreUnix)