/
githubmirror
/
PowerShell
Обзор
Документация
Войти
/
githubmirror
/
PowerShell
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/powershell/engine/Basic/Attributes.Tests.ps1
26 строк
723 B
Steve Lee
Update copyright notice to latest guidance (#12190)
24 мар 2020, 21:08
Не верифицирован
24 мар 2020, 21:08
b7cb335
Код
Авторство
О чём код?
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. Describe "Attribute tests" -Tags "CI" { BeforeEach { Remove-Item $testdrive/test.ps1 -Force -ErrorAction SilentlyContinue } It "<attribute> attribute returns argument error if empty" -TestCases @( @{Attribute="HelpMessage"}, @{Attribute="HelpMessageBaseName"}, @{Attribute="HelpMessageResourceId"} ) { param($attribute) $script = @" [CmdletBinding()] Param ( [Parameter($attribute="")] [String]`$Parameter1 ) Write-Output "Hello" "@ New-Item -Path $testdrive/test.ps1 -Value $script -ItemType File { & $testdrive/test.ps1 } | Should -Throw -ErrorId "Argument" } }