Skip output rendering tests on Windows Server 2012 R2 (#18382)

This commit is contained in:
Aditya Patwardhan
2022-10-29 21:10:03 +05:00
committed by GitHub
parent 4780225ee3
commit f4e68ad875
@@ -2,6 +2,14 @@
# Licensed under the MIT License.
Describe 'OutputRendering tests' -Tag 'CI' {
BeforeAll {
$originalDefaultParameterValues = $PSDefaultParameterValues.Clone()
# Console host does not support VT100 escape sequences on Windows 2012R2 or earlier
if ($IsWindows -and [System.Environment]::OSVersion.Version -le [version]::new(6, 3)) {
$PSDefaultParameterValues["it:skip"] = $true
}
}
BeforeEach {
if ($null -ne $PSStyle) {
$oldOutputRendering = $PSStyle.OutputRendering
@@ -14,6 +22,10 @@ Describe 'OutputRendering tests' -Tag 'CI' {
}
}
AfterAll {
$global:PSDefaultParameterValues = $originalDefaultParameterValues
}
It 'OutputRendering works for "<outputRendering>" to the host' -TestCases @(
@{ outputRendering = 'host' ; ansi = $true }
@{ outputRendering = 'ansi' ; ansi = $true }