From abc3614919d958455bee3bc81ced2c17affe0c85 Mon Sep 17 00:00:00 2001 From: Ilya Date: Wed, 25 Jan 2017 06:04:44 +0400 Subject: [PATCH] Get-Help test reported as skipped if not applicable to the platform (#3009) Addressed #2887 --- .../engine/Help/HelpSystem.OnlineHelp.Tests.ps1 | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/test/powershell/engine/Help/HelpSystem.OnlineHelp.Tests.ps1 b/test/powershell/engine/Help/HelpSystem.OnlineHelp.Tests.ps1 index 80dc9dc906..9d8913919f 100644 --- a/test/powershell/engine/Help/HelpSystem.OnlineHelp.Tests.ps1 +++ b/test/powershell/engine/Help/HelpSystem.OnlineHelp.Tests.ps1 @@ -36,16 +36,15 @@ foreach ($cmdlet in $cmdletList) { # If the cmdlet is not preset in CoreCLR, skip it. - if (Get-Command $cmdlet.TopicTitle -ea SilentlyContinue) - { - # TopicTitle - is the cmdlet name in the csv file - # HelpURI - is the expected help URI in the csv file + $skipTest = (Get-Command $cmdlet.TopicTitle -ea SilentlyContinue) -eq $null - It "Validate 'get-help $($cmdlet.TopicTitle) -Online'" { - $actualURI = Get-Help $cmdlet.TopicTitle -Online - $actualURI = $actualURI.Replace("Help URI: ","") - $actualURI | Should Be $cmdlet.HelpURI - } + # TopicTitle - is the cmdlet name in the csv file + # HelpURI - is the expected help URI in the csv file + + It "Validate 'get-help $($cmdlet.TopicTitle) -Online'" -Skip:$skipTest { + $actualURI = Get-Help $cmdlet.TopicTitle -Online + $actualURI = $actualURI.Replace("Help URI: ","") + $actualURI | Should Be $cmdlet.HelpURI } } }