Files
IronRDP/server/termsrv/tests/generated-scripts.Tests.ps1
Marc-André Moreau cc63ef7d64 feat: add Windows TermService protocol provider (#2381)
Add a side-by-side WTS protocol provider and companion service to
connect IronRDP clients to authenticated Windows desktops.

Provide an indirect display driver, native desktop capture and input,
clipboard redirection, and native device and dynamic-channel bridges.
Include experimental RemoteApp support, authenticated control IPC, and
Windows deployment, signing, and diagnostics tools. Place the server and
an unsupported MSI packaging prototype under server/termsrv, apart from
the reusable crates.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-11-09 12:15:44 -05:00

29 lines
1.3 KiB
PowerShell

Describe 'Generated PowerShell syntax' {
It 'emits parseable PowerShell in <Name>' -ForEach @(
@{ Name = 'capture-irdp-session-screenshot' }
@{ Name = 'deploy-testvm-psremoting' }
) {
# oracle: reference PowerShell language parser.
$termsrvRoot = Split-Path -Parent $PSScriptRoot
$path = Join-Path $termsrvRoot "crates\ironrdp-termsrv\scripts\$Name.ps1"
$tokens = $null
$parseErrors = $null
$ast = [System.Management.Automation.Language.Parser]::ParseFile(
$path, [ref]$tokens, [ref]$parseErrors)
$parseErrors | Should -BeNullOrEmpty
# Parse the generated script, not just its enclosing string literal.
$payloads = $ast.FindAll({
param($node)
$node -is [System.Management.Automation.Language.StringConstantExpressionAst] -and
$node.StringConstantType -eq [System.Management.Automation.Language.StringConstantType]::SingleQuotedHereString
}, $true)
$payloads | Should -Not -BeNullOrEmpty
foreach ($payload in $payloads) {
$null = [System.Management.Automation.Language.Parser]::ParseInput(
$payload.Value, [ref]$tokens, [ref]$parseErrors)
$parseErrors | Should -BeNullOrEmpty
}
}
}